Minimal DXF file for texts in Cyrillic

Minimal DXF file for texts in Cyrillic

Anonymous
Not applicable
1,089 Views
1 Reply
Message 1 of 2

Minimal DXF file for texts in Cyrillic

Anonymous
Not applicable

Hello!

I'm writing a custom program which writes data in DXF format. I'm saving only entities like points and texts. Till now it works as expected, but I have problems when the texts are in Cyrillic. When loaded in AutoCAD, the texts are not properly displayed - texts in Latin are readable, but those in Cyrillic aren't:

2019-10-14_164113.png

 

Attached you can find:

  • DXF file with Cyrillic characters: withoutHeader- can be loaded in AutoCAD.
  • The same DXF file with HEADER section added: withHeader - gives an error when loaded in AutoCAD.

I've found a similar thread here: bad-decoding-of-dxf-file-with-properly-encoded-strings. According to it, DXF files after AutoCAD 2007 can be encoded in UTF-8 (mine files are). So I've tried to set $ACADVER to be AC1024 (for AutoCAD 2010) and I was expecting the texts will be displayed correctly as the encoding of the file is UTF-8:

0
SECTION
2
HEADER
9
$ACADVER
1
AC1024
9
$DWGCODEPAGE
3
ANSI_1251
0
ENDSEC
... rest of the DXF string

But when loaded in AutoCAD it gives an error:

Error in APPID Table
DXF read error on line 102.
Invalid or incomplete DXF input -- drawing discarded.

I assume that the HEADER section is not complete and missing some required parameters but don't know which are they. 

 

Can someone points me out how to properly set $ACADVER variable, or what are the minimal variables to be set in the HEADER section?

0 Likes
1,090 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi, @Anonymous ! Have you found any solution? I want to write cyrillic texts, too. Can't figure out how to do it

0 Likes