Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/07/2021 in all areas

  1. ================================================= vlisp return the name of the folder in Unicode ?!? (setq a (strcat (getvar "dwgprefix")(setvar "dwgname"))) = D:\\\U+05D3\U+05D5\U+05E8\U+05D5\U+05DF\\DRAWING3 .DWG" because the folder name is in Hebrew : "D:\\דורון\\DRAWING3.DWG" I found the solution: Problem displaying Arabic letters on windows - YouTube ttps://www.youtube.com/watch?v=XkczYaBlbNY
    1 point
  2. hi, you only can write to asciii file, e.g .dxf, txt, csv etc.., but not a drawing file do you mean open a new drawing? just curious ac2007 ([color="blue"]ascii[/color] "\U+6C49") [color="green"];returns only 92 the first char[/color]
    1 point
  3. ttps://www.youtube.com/watch?v=XkczYaBlbNY Problem displaying Arabic letters on windows - YouTube
    1 point
  4. I HAVE A FILE NAME IN UNICODE :(SETQ QFILE "D:\\\U+05D3\U+05D5\U+05E8\U+05D5\U+05DF\\DRAWING3.DWG") I CAN'T OPEN A NEW FILE (setq f (open qfile "w")
    1 point
  5. @honglog: It seems that BricsCAD (the program I use) and AutoCAD have a different implementation of vl-string->list and perhaps also of the ascii function. Some tests with BricsCAD: (setq a "\U+0647") (ascii a) => 1607 (vl-string->list a) => (1607) (String_To_UniCode a) => "\\U+0647" (setq b "\U+554A") (ascii b) => 21834 (vl-string->list b) => (21834) (String_To_UniCode b) => "\\U+554A"
    1 point
  6. (vl-string->list "ABC") does return (65 66 67). For ASCII characters, it works. What about international characters? (vl-string->list "ه") returns (92 85 43 48 54 52 55), which turns out to be \U+0647 And dismayingly, in my dwgcodepage ANSI_936, (vl-string->list "啊") returns (176 161) rather than its unicode which should be \U+554A
    1 point
  7. @Ahankhah: The function MT:CONV:UNICHAR->CHAR doesn't do much... In a roundabout way it merely returns the input string. (setq a (MT:CONV:UNICHAR->CHAR "\U+0647")) (setq b "\U+0647") (= a b) => T My suggestion for your request: ; (String_To_UniCode "ABC") => "\\U+0041\\U+0042\\U+0043" (defun String_To_UniCode (str) (apply 'strcat (mapcar '(lambda (int / hex) (setq hex (KGA_Math_Dec_To_Hex int)) (repeat (- 4 (strlen hex)) (setq hex (strcat "0" hex)) ) (strcat "\\U+" hex) ) (vl-string->list str) ) ) ) (defun KGA_Math_Dec_To_Base (int base / lst rest) (if (zerop int) "0" (progn (while (> int 0) (setq rest (rem int base) lst (cons (+ rest (if (<= rest 9) 48 55)) lst) int (/ int base) ) ) (vl-list->string lst) ) ) ) ; (KGA_Math_Dec_To_Hex 2147483647) => "7FFFFFFF" ; (KGA_Math_Dec_To_Hex 14285) => "37CD" ; (KGA_Math_Dec_To_Hex 0) => "0" (defun KGA_Math_Dec_To_Hex (int) (KGA_Math_Dec_To_Base int 16) )
    1 point
  8. Hi, what if you replace *ret* with (vl-string->list *ret*)? does it return (92 85 43 48 54 52 55) ?
    1 point
×
×
  • Create New...