3 ms·
What cursed madness have you hit that spits out UTF-32 under normal conditions?! That can only be a bug - UTF-32/UCS-4 never saw external use, and has only ever
by arghwhat 2y ago
What cursed madness have you hit that spits out UTF-32 under normal conditions?! That can only be a bug - UTF-32/UCS-4 never saw external use, and has only ever been used for in-memory fixed-width character representation, e.g. runes in Go.
You never have to worry about whether you're dealing with ASCII vs. UTF-8, but rather if you're dealing with UTF-8 vs. ISO-8859-1, or worse, Shift JIS or similar.
- vbezhenar 2y agoI think that I hit that with Java: % java -Dfile.encoding=UTF-32 Test | hexdump -C 00000000 00 00 00 48 00 00 00 65 00 00 00 6c 00 00 00 6c |...H...e...l...l| 00000010 00 00 00 6f 00 00 00 2c 00 00 00 20 00 00 00 77 |...o...,... ...w| 00000020 00 00 00 6f 00 00 00 72 00 00 00 6c 00 00 00 64 |...o...r...l...d| 00000030 00 00 00 0a |....| 00000034 From quick googling it seems that glibc does not support it, so it should not happen.
- Netch 2y ago> it seems that glibc does not support it `iconv` does, and this is enough in common. Among with tons of eerie EBCDIC/whatever...
- Netch 2y ago> That can only be a bug - UTF-32/UCS-4 never saw external use I regularly use `iconv -t utf-32be | hd` to look what a bizarre sequence is denoting yet another weird symbol like an itchy hedgehog. And what is a real reason to disallow this?