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

Camilo Polyméris cpolymeris at gmx.net
Mon Feb 19 22:49:56 UTC 2007


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.
Camilo




More information about the Linux-audio-dev mailing list