[FFmpeg-devel] [PATCH 1/3] lavu: add av_is_valid_utf8().
nicolas.george at normalesup.org
Sun Apr 7 10:36:19 CEST 2013
L'octidi 18 germinal, an CCXXI, Reimar Döffinger a écrit :
> I don't think this macro improves readability, quite the opposite.
I find they do, but I will not insist on it.
> Why should a normal byte-order-mark be accepted in UTF-8?
> It really has no place or purpose in it either.
> (though it might be hard to detect, since the code point is really just
> a special non-breaking space I think)
Exactly: U+FEFF is utterly useless, but it is a valid Unicode character,
while U+FFFE is guaranteed to never exist, precisely to detect endianness
errors in conversions.
Also, there are quite a lot of text file out there in UTF-8 with a BOM; I
believe some editors take it as a hint to open the file in UTF-8 rather than
a legacy 8-bits encoding.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel