Page 1 of 1

locale and filenames

Posted: Wed May 24, 2006 6:45 am
by Dmi
(read-file "some-name-with-national-characters") wan't read the file :-(

In MSWin I have two russian encodings (Russian_Russia.1251 and Russian_Russia.866), I tried to (set-locale ...) with both (with success result), but read-file returns nil either.

Posted: Wed May 24, 2006 7:22 am
by Lutz
I assume that these are 8 bit code pages not UTF8 multibyte characters?

Can you do a (map char (explode "filename")) and post the result? Perhaps the numbers tell us something.

Are you running newLISP in a Windows shell or in the newlisp-tk window?

Does the name display Ok when you do a (directory) ?

Lutz

Posted: Wed May 24, 2006 1:21 pm
by Dmi
Thanks!
I forgot somehow that console works in CP866, but all other system (including filesystem) - in CP1251.
So when typing directly in interactive console I must use recoder CP866-CP1251 before access to filesystem.