Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 19-Apr-17 3:46am

1 solution

A bit more reading

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Software[^][^]

+ Adding the UTF8-BOM characters helps the viewer see these characters as DBCS
 
Share this answer
 
Comments
RAMASWAMY EKAMBARAM 20-Apr-17 7:29am    
I had submitted code for Greek characters - see if any help:
"https://www.codeproject.com/Answers/1174538/How-do-I-print-the-symbol-theta-in-C-language#answer2"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900