on 五, 2008-08-15 at 17:45 +0800, Stephan Bergmann wrote: > If your C++ source file is UTF-8 encoded, and your C++ compiler does not > spoil this, it *might* work to do > > OUString("分区", 6, RTL_TEXTENCODING_UTF8); > > or equivalent > > OUString(RTL_CONSTASCII_STRINGPARAM("分区"), RTL_TEXTENCODING_UTF8); > > However, in any event, it is better to avoid non-ASCII characters in > your C++ source file (and if your file were part of the OOo code base, > it would be illegal if it contained non-ASCII characters). Use > something like > > OUString("\xE5\x88\x86\xE5\x8C\xBA", 6, RTL_TEXTENCODING_UTF8); > // U+5206, U+533A > > or > > sal_Unicode const b[] = { 0x5206, 0x533A }; > OUString(b, 2); > > instead. > It works and thank you for your suggestion.
Best Regards, -- Vern 2008-08-16
signature.asc
Description: Digital signature