This article in our forum demonstrates how to display foreign characters in a PDF file by converting a Unicode string to a UTF8Char string.
In the HOOPS Publish API, every character string must be given as A3DUTF8Char*
. However, when dealing with foreign character sets, such as Japanese or Russian, they are initially given as Unicode strings.
Here is an example with a Japanese character string:
...
Allocate the destination string
...
string
...
Code Block |
---|
wchar_t sString[] = L"新細明體";
A3DUTF8Char* pcDestString = new A3DUTF8Char[500];
A3DMiscUnicodeToUTF8((const A3DUTF8Char*)sString, pcDestString ); |
Now pcDestString
can be used in any function or field data requiring a UTF8Char string, and the Japanese characters will be displayed correctly in the PDF file.
...
.