|
From: Prochnow, C. <cp...@se...> - 2005-07-04 23:58:05
|
Hi List,
i just wanted to say that the Unicode support in P2 is making progress ...
after some beers, and writing a small test, i must definitely say it really
rocks !!
Look at this code:
--
File f("test.txt", File::Write); /* open "test.txt" for writing... */
TextStream strm(f); /* we want to stream text to the file ... */
String str("abcdefg");
str.append(Char(0x00e4)); /* adds a german umlaut to the string ... */
strm.setCodepage("ebcdic-de"); /* let's output in German EBCDIC encoding */
strm << str;
strm.setCodepage("utf32"); /* let's output in utf32 ... */
strm << str;
strm.setCodepage("utf8"); /* dont waste so much space .. use utf8 ;) */
strm << str;
--
cool .. isn't it ?
TextStream's on-the-fly codepage-conversion enables us to transparently
input/output text in any encoding ICU supports.
Thats it, back to the coding session ...
Greetings,
Christian
|