guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile can't find a chinese named file


From: Chaos Eternal
Subject: Re: guile can't find a chinese named file
Date: Sun, 27 Nov 2016 12:16:55 +0000

Seems that UTF-8 encoded string has been converted to unicode before
calling `open',
but on filesystem the filename is utf8 string




On Sun, Nov 27, 2016 at 7:58 PM Thomas Morley <address@hidden>
wrote:

> Hi all,
>
> a chinese user came up with a weird problem.
>
> He wants to process the string retrieved by (command-line) further, in
> his file-name he used some chinese characters.
> I tracked it down to the attached minimal example.
> With guile-2.0.13 I get:
>
> guile filename_名字.scm
> ;;; Stat of /home/hermann/Desktop/filename_??.scm failed:
> ;;; ERROR: In procedure stat: No such file or directory:
> "/home/hermann/Desktop/filename_\u540d\u5b57.scm"
> Backtrace:
> In ice-9/boot-9.scm:
>  160: 8 [catch #t #<catch-closure 55cae58fe4e0> ...]
> In unknown file:
>    ?: 7 [apply-smob/1 #<catch-closure 55cae58fe4e0>]
> In ice-9/boot-9.scm:
>   66: 6 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  432: 5 [eval # #]
> In ice-9/boot-9.scm:
> 2404: 4 [save-module-excursion #<procedure 55cae59209c0 at
> ice-9/boot-9.scm:4051:3 ()>]
> 4058: 3 [#<procedure 55cae59209c0 at ice-9/boot-9.scm:4051:3 ()>]
> 1727: 2 [%start-stack load-stack ...]
> 1732: 1 [#<procedure 55cae5935db0 ()>]
> In unknown file:
>    ?: 0 [primitive-load "/home/hermann/Desktop/filename_\u540d\u5b57.scm"]
>
> ERROR: In procedure primitive-load:
> ERROR: In procedure open-file: No such file or directory:
> "/home/hermann/Desktop/filename_\u540d\u5b57.scm"
>
> What to do to make it work?
> I messed around setting locales, to no avail so far.
>
> Btw, the same with guile-1.8:
> guile-1.8 filename_名字.scm
>
> ("filename_�\x90\x8d字.scm")
> (filename_名字.scm)
>
> The string is strange, but at least the file is found.
>
> Cheers,
>   Harm
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]