GNU bug report logs - #33053
scm_i_mirror_backslashes assumes ASCII-compatible locale encoding

Previous Next

Package: guile;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Mon, 15 Oct 2018 20:47:01 UTC

Severity: normal

Tags: notabug

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33053 in the body.
You can then email your comments to 33053 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#33053; Package guile. (Mon, 15 Oct 2018 20:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark H Weaver <mhw <at> netris.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 15 Oct 2018 20:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: bug-guile <at> gnu.org
Subject: scm_i_mirror_backslashes assumes ASCII-compatible locale encoding
Date: Mon, 15 Oct 2018 16:45:40 -0400
The 'scm_i_mirror_backslashes' in load.c operates on C strings in the
locale encoding, and assumes that the locale encoding is ASCII
compatible.  In the Shift_JIS encoding, used in the "JP_jp.sjis" locale,
backslash '\' is mapped to a multibyte character, and the Yen sign '¥'
is represented using code 0x5C, the same code as backslash '\' in ASCII.

As a result, users of the "JP_jp.sjis" locale will have Yen signs '¥' in
their file names converted into slashes by this function.

     Mark




Information forwarded to bug-guile <at> gnu.org:
bug#33053; Package guile. (Mon, 15 Oct 2018 23:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 33053 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 33053 <at> debbugs.gnu.org
Subject: Re: bug#33053: scm_i_mirror_backslashes assumes ASCII-compatible
 locale encoding
Date: Mon, 15 Oct 2018 19:06:53 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> The 'scm_i_mirror_backslashes' in load.c operates on C strings in the
> locale encoding, and assumes that the locale encoding is ASCII
> compatible.  In the Shift_JIS encoding, used in the "JP_jp.sjis" locale,
> backslash '\' is mapped to a multibyte character, and the Yen sign '¥'
> is represented using code 0x5C, the same code as backslash '\' in ASCII.
>
> As a result, users of the "JP_jp.sjis" locale will have Yen signs '¥' in
> their file names converted into slashes by this function.

I miswrote the locale name above.  The locale name is "ja_JP.sjis".

      Mark




Information forwarded to bug-guile <at> gnu.org:
bug#33053; Package guile. (Sat, 20 Oct 2018 01:23:01 GMT) Full text and rfc822 format available.

Message #11 received at 33053 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 33053 <at> debbugs.gnu.org
Subject: Re: bug#33053: scm_i_mirror_backslashes assumes ASCII-compatible
 locale encoding
Date: Fri, 19 Oct 2018 21:21:49 -0400
tags 33053 + notabug
close 33053
thanks

Mark H Weaver <mhw <at> netris.org> writes:

> Mark H Weaver <mhw <at> netris.org> writes:
>
>> The 'scm_i_mirror_backslashes' in load.c operates on C strings in the
>> locale encoding, and assumes that the locale encoding is ASCII
>> compatible.  In the Shift_JIS encoding, used in the "JP_jp.sjis" locale,
>> backslash '\' is mapped to a multibyte character, and the Yen sign '¥'
>> is represented using code 0x5C, the same code as backslash '\' in ASCII.
>>
>> As a result, users of the "JP_jp.sjis" locale will have Yen signs '¥' in
>> their file names converted into slashes by this function.
>
> I miswrote the locale name above.  The locale name is "ja_JP.sjis".

It seems that I was mistaken in my assumption that '\' is mapped to a
multibyte character in Shift_JIS.  According to John Cowan, "the
character at #\x5C is *functionally* a backslash that is *displayed* as
a yen sign".

It seems that this is not actually a bug in 'scm_i_mirror_backslashes',
so I'm closing this bug.

      Mark




Added tag(s) notabug. Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Sat, 20 Oct 2018 01:23:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 33053 <at> debbugs.gnu.org and Mark H Weaver <mhw <at> netris.org> Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Sat, 20 Oct 2018 01:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.