Re: g_utf8_validate() and NUL characters
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-devel-list gnome org
- Subject: Re: g_utf8_validate() and NUL characters
- Date: Tue, 07 Oct 2008 14:50:16 -0700
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]