[linux-audio-dev] [completely OT] c++ and UTF-8 question

Paul Davis paul at linuxaudiosystems.com
Mon Feb 19 23:04:00 UTC 2007


On Mon, 2007-02-19 at 19:49 -0300, Camilo Polyméris wrote:
> Julien Claassen wrote:
> > Hi!
> >   I'm sorry to ask that here, but it seems I can't get an anser anywhere else.
> >   Does the libstdc++ support UTF-8 strings? Or is there some simple example 
> > code snippet somewhere to derive/modify something which would fullfill this 
> > need?
> >   Kindest regards and thanks!
> >            Julien
> >
> > --------
> >   
> Not really, but it is easy to implement:
>     typedef basic_string<wchar_t> string;
> For UTF-16 (which is variable width) you'd have to supply your own 
> char_traits, or reimplement some string functions.

Glib::ustring is probably what you want. Glib is not part of any
graphics toolkit - it is a low level portability library providing lots
of cross-platform and utility goodness.

--p






More information about the Linux-audio-dev mailing list