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: David Kastrup
Subject: Re: guile can't find a chinese named file
Date: Thu, 16 Feb 2017 21:52:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Marko Rauhamaa <address@hidden>
>> Cc: address@hidden,  address@hidden
>> Date: Thu, 16 Feb 2017 21:35:12 +0200
>> 
>> >> If emacs managed to restore a binary/text unification (and infect Guile
>> >> in the process), that would be quite an accomplishment.
>> >
>> > I don't understand what "binary/text unification" means, sorry.
>> 
>> I say filenames are byte strings. Guile says they are character strings.
>> You are saying they are both at once.
>
> Yes, to be viable in real-life situation, Guile needs to support
> character strings with occasional embedded raw bytes that cannot be
> interpreted as characters.

They can be interpreted as "characters", just not inside the _Unicode_
character range.  Raw bytes 0x00 to 0xff could be assigned character
codes -256 to -1 (when decoding UTF-8, only "raw bytes" 0x80 to 0xff
will occur since 0x00 to 0x7f is always represented as its own Unicode
code point).  That would it easy to do a blanket check for invalid
sequences.

> Which means string implementation needs to have a special
> representation for these raw bytes that would allow lossless
> round-trip, and at the same time avoid the pitfalls some of which were
> mentioned here.
>

-- 
David Kastrup



reply via email to

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