newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: Dmi on May 23, 2006, 11:45:19 PM

Title: locale and filenames
Post by: Dmi on May 23, 2006, 11:45:19 PM
(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.
Title:
Post by: Lutz on May 24, 2006, 12:22:50 AM
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
Title:
Post by: Dmi on May 24, 2006, 06:21:04 AM
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.