Autolisp read file encording

Autolisp read file encording

Anonymous
Not applicable
1,299 Views
6 Replies
Message 1 of 7

Autolisp read file encording

Anonymous
Not applicable

Hi,

 

I created a lisp that loads the .gml file and prints the data to autocad. The problem arises when printing text in autocad, because it does not print some characters well. How do I solve this?

 

0 Likes
Accepted solutions (1)
1,300 Views
6 Replies
Replies (6)
Message 2 of 7

Sea-Haven
Mentor
Mentor

Not sure whats in a GML but your font can make printing extended characters work, try dingbats. Use a TTF.

0 Likes
Message 3 of 7

Anonymous
Not applicable

To make it clearer I am submitting an lsp and gml file. Therefore, when printing text in autocad, some characters from the gml file are not recognized.

0 Likes
Message 4 of 7

hak_vz
Advisor
Advisor

Replace local letters with UNICODE codes and use TTF fonts or shx fonts that support UNICODE characters.

Create macro in your text editor and use it on gml or any text file that uses Croatian alphabet.

 

<jis:NAZIV>\U+0110ILS \U+0160LAVKO</jis:NAZIV>

 

 

Š  \U+0160
Đ  \U+0110
Č  \U+010C
Ć  \U+0106
Ž  \U+017D

š  \U+0161
đ  \U+0111
č  \U+010D
ć  \U+0107
ž  \U+017E

 

Consult this link for unicodes

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 5 of 7

Anonymous
Not applicable

I thought there was some decoding command inside the lisp file...

0 Likes
Message 6 of 7

hak_vz
Advisor
Advisor
Accepted solution

Only if you or your users use latest version of Autocad then these changes to vl-xxx functions apply

If you want to create scrips that will work in older version than this is the only viable solution since

older function supported only ANSI

There is LISPSYS system variable used to controls which AutoLISP engine is used and the behavior of the function.

0 - ASCII character support (legacy behavior)

1 or 2 - Unicode character support

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 7 of 7

Anonymous
Not applicable

Ok, thanks a lot.

0 Likes