I need to write Korean characters into a DXF file (that's an AutoCAD drawing file, it's not binary but text).
Our customer has supplied us with a DXF file from a rival product that outputs Korean characters (when viewed in some viewers..)
Now (AFAIK) there is no UTF or other header in their dxf file output
First 16 characters of the dfx file are
20 20 20 20 30 0D 0A 20 37 35 0D 0A 20 20 20 20
The relevant bit of the file in Notepad++ looks like this
디엠에스에스
and in a hex viewer
B5 F0 BF A5 BF A1 BD BA BF A1 BD BA
Using Notepad++ I can copy and paste individual characters and they view as expected within that file.
If I try and do the same thing with my own DXF output
Notepad ++
µð
Hex editor
B5 F0
and if I force Notepad++ to use UTF encoding it looks like this
xB5 xF0
From what I understand (what I've read in articles here this morning :-) ) the viewer tries to interpret the encoding as it reads it. I'm not sure what the problem with my output is.
What I have tried:
Articles on Codeproject and elsewhere