Re: g_utf8_validate() and NUL characters



Behdad Esfahbod wrote:
Havoc Pennington wrote:
On Mon, Oct 6, 2008 at 4:42 PM, coda <coda trigger gmail com> wrote:
Is there any reason not to support NUL/U+0000 in strings?
>>
The point of not allowing nul in g_utf8_validate() I think is that nul
is not valid text. It may be valid unicode in some technical sense,
but it isn't text, in the same sense that malformed utf8 isn't text.

What's so weird about NUL bytes Havoc?  There is text, and there is
nul-terminated text.  In the former, a NUL byte is as valid as any other valid
UTF-8 character.

I think what he really meant (or if not, here's my take on it) was that NUL bytes aren't *printable* text... like you'd say of low-value ASCII data. Sure, it's technically "text," but most of it isn't something you can represent visually in a useful manner.

	-brian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]