Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Allocate the destination string

  2. Convert the Unicode string to the UTF8 one

    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 UTF8 string. And the Japanese characters will be displayed correctly in the PDF file.

Info

In Visual Studio, if a source file directly contains directly foreign characters, then the source file must be saved with a correct encoding, such as : Unicode (UTF-8 with signature) - Codepage 65001.

...