@Anonymous
Here is sample for what you had to do, what I told you through private messages and over a phone.
In attachment is a txt file with Croatian alphabet symbols that we read into the drawing and create text entity for
each line of text.Notice that we don't use vla-xxx functions since they are bound to ascii.
(defun readandreplace ( / f file_in pt del _text str_subst_all ent
(defun str_subst_all (new old string / search return)
(setq search (strcat old "*") return "")
(while (not (eq string ""))
(if (wcmatch string search)
(setq string (substr string (1+ (strlen old))) return (strcat return new))
(setq return (strcat return (substr string 1 1)) string (substr string 2))))
return
)
(setvar 'cmdecho 0)
(setq f (getfiled "Open input file :" (getvar "dwgprefix") "txt" 2))
(setq file_in (open f "r"))
(setq pt (getpoint "\nSelect point to enter text >"))
(setq del (list 0 (* 2 (getvar 'textsize)) 0))
(while (and(setq _text (read-line file_in)))
(setq _text (str_subst_all "\\U+0160" "Š" _text))
(setq _text (str_subst_all "\\U+0161" "š" _text))
(setq _text (str_subst_all "\\U+0110" "Đ" _text))
(setq _text (str_subst_all "\\U+0111" "đ" _text))
(setq _text (str_subst_all "\\U+010C" "Č" _text))
(setq _text (str_subst_all "\\U+010D" "ć" _text))
(setq _text (str_subst_all "\\U+0106" "Ć" _text))
(setq _text (str_subst_all "\\U+0107" "ć" _text))
(setq _text (str_subst_all "\\U+017D" "Ž" _text))
(setq _text (str_subst_all "\\U+017E" "ž" _text))
(command "_.text" pt "" "" _text)
(setq pt (mapcar '- pt del))
)
(close file_in)
(setvar 'cmdecho 1)
(princ)
)
(readandreplace)
Miljenko Hatlak

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.