Re: g_utf8_validate() and NUL characters



Hi,

On Thu, Oct 9, 2008 at 8:46 PM, Behdad Esfahbod <behdad behdad org> wrote:
>
> nul is invalid *just* because you declared it so.
>

I guess my whole claim is that it's useful/better to declare it
invalid in contexts where you really want text, as opposed to an
arbitrary binary stream. I don't see why it's useful to declare it
valid. I don't see the practical importance of the utf8 spec as the
arbiter of validity here.

I see why it's useful to have some codepaths that handle binary
garbage (an arbitrary stream), I see why it's useful to have a
codepath that handles non-nul utf8, I don't see why it's useful to
handle utf8-including-nul because all the use-cases I can come up with
would equally apply to arbitrary binary data.

What is the example where you want to allow utf8-including-nul that
would not equally argue for handling arbitrary binary data?

Havoc


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