iyzs...@member.fsf.org (宋文武) skribis:

> l...@gnu.org (Ludovic Courtès) writes:

[...]

>> What often works in such cases is to force ISO-8859-1 encoding
>> (“Latin-1”), which is a “catch-all” encoding (it’s an 8-bit encoding
>> that covers the 256 values):
>>
>>   (with-fluids ((%default-port-encoding "ISO-8859-1"))
>>     (substitute* file-in-arbitrary-ascii-compatible-encoding
>>       …))
>>
>
> Yeah, I tried that, but it was also producing 'encoding-error' in the
> builder, so I gave up it.
>
> It seems that's because the locale is "C" when calling `substitute*',

Weird; the ‘install-locale’ phase normally installs a UTF-8 locale, and
the locale shouldn’t matter once we’re overridden
‘%default-port-encoding’.

> and the files have UTF-8 copyright sign (©).  But out of the builder,
> the `substitute*' works fine even with '(setlocale LC_ALL "C")'.

Hmm, OK.  Subtle things going on.  :-)

Thanks,
Ludo’.

Reply via email to