2 ms·
That doesn't really make sense. If someone's intending to encode ¢ in utf-8, endianness does not come into play, as it's a stream of octets, not of anything la
by kelnos 14y ago
That doesn't really make sense. If someone's intending to encode ¢ in utf-8, endianness does not come into play, as it's a stream of octets, not of anything larger that you can chunk such that you could swap bytes.
At any rate, if you were to encode ¢ in UTF-16BE, it would be 0x00a2, not 0xc2a2. If a piece of software then misinterpreted it as latin1, likely you'd get nothing at all due to the embedded NUL.
$ echo -n ¢ | iconv -f UTF-8 -t UTF-16BE | hexdump -C
00000000 00 a2 |..|
- kbolino 14y ago"That doesn't really make sense." Indeed. I either completely misread the parent post, or else it said something different when I responded to it (knowing myself, I'm going with the former).