Menu

Show posts

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 Menu

Messages - qinying

#1
Anything else we might add? / Re: about (directory)
July 22, 2017, 09:38:02 AM
Quote from: "TedWalther"Does that mean the non-UTF8 version of newlisp is working for you?


Can only handle Chinese directory and file names,

can not  parsing strings correctly
#2
Quote
> (set 'str "中文字符串")

"中文字符串"

> (first str)

"中"

> (last str) ;Should be "串"

"?

> (rest str)

"文字符串"

---------

> (set 'name "覃文运")

"覃文运"

> (first name) ;Should be "覃"

"覃文"

> (rest name) ;Should be "文运"

"运"

> (last name)

"运"
#3
Anything else we might add? / Re: about (directory)
July 21, 2017, 06:04:34 PM
try the non utf-8 version

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"


then I change the locale



> (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))))
中文可以吗?
"中文可以吗?"
#4
Anything else we might add? / Re: about (directory)
July 21, 2017, 05:22:44 PM
I'm new to programming and I can't solve this problem by myself, so I can only look forward to the new version
#5
Anything else we might add? / Re: about (directory)
July 18, 2017, 05:11:40 PM

> (set-locale)
("Chinese (Simplified)_People's Republic of China.936" ".")
#6
Anything else we might add? / Re: about (directory)
July 18, 2017, 04:51:22 AM
so glad to receive the reply,thanks!

> (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)
#7
Anything else we might add? / about (directory)
July 16, 2017, 06:11:07 AM
The Chinese file name cannot be displayed correctly.on my win7-64-bit computer.

it's a bug?