International characters in texts

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

Post Reply
User avatar
andrew
Site Admin
Posts: 5641
Joined: Fri Mar 30, 2007 6:07 am

International characters in texts

Post by andrew » Mon Aug 25, 2014 2:55 pm

From a dxflib user:
We are currently experiencing problems with Chinese / Japanese characters. How can I get this working using dxflib?

User avatar
andrew
Site Admin
Posts: 5641
Joined: Fri Mar 30, 2007 6:07 am

Re: International characters in texts

Post by andrew » Mon Aug 25, 2014 2:58 pm

The safest way to ensure that international characters / any Unicode characters are stored / loaded correctly is to escape them using the \U+xxxx notation (where xxxx is the hexadecimal character Unicode):

For example the string "日本語" can be stored in DXF as "\U+65e5\U+672c\U+8a9e".

Julien
Newbie Member
Posts: 3
Joined: Thu Sep 18, 2014 6:06 pm

Re: International characters in texts

Post by Julien » Thu Sep 18, 2014 6:41 pm

Hello,

Thanks, it worked.

Now for Editors that do not support Chinese characters I have "?" but for others everything is great.

Regards,
Julien

Post Reply

Return to “dxflib 'How Do I' Questions”