Does that mean the non-UTF8 version of newlisp is working for you?Quote from: "TedWalther"
Can only handle Chinese directory and file names,
can not parsing strings correctly
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuDoes that mean the non-UTF8 version of newlisp is working for you?Quote from: "TedWalther"
Quote
> (set 'str "中文字符串")
"中文字符串"
> (first str)
"中"
> (last str) ;Should be "串"
"?
> (rest str)
"文字符串"
---------
> (set 'name "覃文运")
"覃文运"
> (first name) ;Should be "覃"
"覃文"
> (rest name) ;Should be "文运"
"运"
> (last name)
"运"
newLISP v.10.7.2 64-bit on Windows IPv4/6 libffi, options: newlisp -h
> (set-locale)
("C" ".")
> (directory)
("." ".." "newlisp.exe" "208194189168206196177190206196181181.txt")
> (println (last (directory)))
新建文本文档.txt
"208194189168206196177190206196181181.txt"
> (append-file (last (directory)) "中文可以吗?")
12
> (read-file (last (directory)))
"214208206196191201210212194240163191"
> (println (read-file (last (directory))))
中文可以吗?
"214208206196191201210212194240163191"
> (set-locale "Chinese (Simplified)_People's Republic of China.936" ".")
("Chinese (Simplified)_People's Republic of China.936" ".")
> (directory)
("." ".." "newlisp.exe" "新建文本文档.txt")
> (println (read-file (last (directory))))
中文可以吗?
"中文可以吗?"
> (define str->bytes (lambda (s) (unpack (dup "b" (length s)) s)))
(lambda (s) (unpack (dup "b" (length s)) s))
> (directory)
("." ".." "guiserver" "index.html" "newlisp.exe" "鏂板缓鏂囨湰鏂囨。.txt")
> (str->bytes "新建文本文档")
(208 194 189 168 206 196 177 190 206 196 181 181)
> (str->bytes "鏂板缓鏂囨湰鏂囨。")
(230 150 176 229 187 186 230 150 135 230 156 172 230 150 135 230 161 163)