Re: [gtkmm] One thing we didn't really discuss: ustring vs string



On Thu, 2002-08-08 at 13:33, Murray Cumming wrote:
> On Thu, 2002-08-08 at 18:09, Michael Babcock wrote:
> > Murray Cumming wrote:
> > [snip]
> > > 1. We currently use Glib::ustring whenever we are not _certain_ that the
> > > string could never be UTF8. Filenames can probably never be UTF8 so they
> > > should be std::string. Others might have more expertise.
> > 
> > Why can filenames never be UTF8? I thought one of the reasons for 
> > creating UTF8 was to be able to use Unicode in Unix filenames, avoiding 
> > the null-terminated string problems of using a 16-bit wide character 
> > Unicode encoding.
> 
> Maybe because other systems can't cope with UTF8? I think, for instance,
> that UTF8 can have null bytes in the middle. I'm not 100% sure whether
> filenames can be UTF8. Other people seem to be sure that they can't, so
> I defer to them.

I had the discussion on null bytes before. UTF-8 /cannot/ have null
bytes in the middle.

My linux kernel offers the option for my codepage to be utf8. I haven't
tried it yet, though, but I don't see why it would be a problem if the
filesystem and such properly support it.

Julian




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