Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I determine the text encoding in a dwg file?

4 REPLIES 4
Reply
Message 1 of 5
Bitman75
4179 Views, 4 Replies

How can I determine the text encoding in a dwg file?

Hi there!

Can anybody answer my question(s)?

Does the text encoding depend on something in a dwg file or it is always the same? If it is always the same then what is it? Is it ANSI (very incredible) /UTF8/UTF16?

Thanks in advance!

4 REPLIES 4
Message 2 of 5
imadHabash
in reply to: Bitman75

Hi and Welcome to AutoCAD Forum,

 

>> Does the text encoding depend on something in a dwg file or it is always the same?  <<

texts always refer to the font style that you use it from STYLE command.

 

Regards,

Imad Habash

EESignature

Message 3 of 5
Bitman75
in reply to: imadHabash

I doesn't use any STYLE command. 🙂 I have to convert dwg file contents by program and I need the text encoding information for this. I found that my 3rd party tool given back ANSI encoded text. 😮 This tool gives back the right encoding in case of DXF depending on the file version. So I was surprised. Does the text styles contain encoding information style by style? 

Message 4 of 5
leeminardi
in reply to: Bitman75

I think AutoCAD 2018 uses UTF-16.

 

I tested this by using MTEXT to create some text and using the Insert, Symbol, Other... feature in the Text Editor to bring up a Character Map.  There you will see the UTF 16 encoding, e.g., . U+0041 for "A" and U+00B0 for the degree sign "°".

cm.JPG

lee.minardi
Message 5 of 5
Bitman75
in reply to: leeminardi

OK. But I have to read files made by unpredictable ACD versions...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

State of Sustainability Webinar


AutoCAD Inside the Factory