masoud_123 发表于 2022-7-5 18:16:26

None-English Stirng in Visual

Hi
Can anyone please help me with typing none-english (like Russian orArabic) characters in VLISP functions and then exporting to MS Wordusing (vlax-invoke-method 'TypeText)?
 
Regards

Lee Mac 发表于 2022-7-5 18:31:25

You cannot use non-ASCII characters in AutoLISP, you will need to represent these characters using their Unicode code points (e.g. \\U+00B2)

masoud_123 发表于 2022-7-5 18:45:15

Thank you Lee Mac... I've learnt alot from you, and appreciate your knowledge.
 
But when I use the ascii code in (vlax-invoke-method 'TypeText "\\U+00B") it's typed \\U+00B in the MS word file and not the target characters.

Lee Mac 发表于 2022-7-5 19:04:03

I'm pleased to hear that you could learn from my work.
 
I can't test it at the moment, but have you tried "\\U+00B2" as suggested?

masoud_123 发表于 2022-7-5 19:13:10

 
Yes, I've tested the "\\U+00B2"character.
 
Isn't this issue related to MS word?

Lee Mac 发表于 2022-7-5 19:20:52

 
Not entirely - I am unsure of the character format required by MS Word to accept a Unicode character, but regardless of the required format, a Unicode character cannot appear as a literal in AutoLISP code, as AutoLISP will only accept ASCII characters.
页: [1]
查看完整版本: None-English Stirng in Visual