 | OO-Snippets: use none ASCII chars in stringsCommons| Keywords | strings, UNICODE, ASCII, textencoding, RTL_TEXTENCODING_MS_1252, ISO_8859_15, characters, conversion |
|---|
| Language | Cpp |
|---|
| Application | Office |
|---|
| Authors | Stephan Bergman (initial)
Tom Schindl
|
|---|
| Supported Versions | |
|---|
| Supported OS | |
|---|
| Question |
How to use characters in Strings which are not ASCII?
|
|---|
| Answer | UNO uses UNICODE strings. But in many programming languages you may have ASCII strings in a certain encoding.
Thus you have to transform your string to a UNICODE string by specifying the encoding of your ASCII string. For sources written under MS-Windows (R), RTL_TEXTENCODING_MS_1252 should work in most cases. |
|---|
Reference <XPropertyReplace> rPropRepl
...
rPropRepl->setReplaceString(OUString("&164;", 1, ISO_8859_15 ));
|
Changelog| Date | User | Modification |
|---|
| 2004-06-22 | tomsontom | Modified to match new snippet-DTD | | 0000-00-00 | ste | Initial version |
|