Subject: bug#13879: closed (Re: bug#13879: Change src/msdos.c from raw-text to ASCII)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 06 Mar 2013 16:25:03 +0000

Your bug report

#13879: Change src/msdos.c from raw-text to ASCII

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13879: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13879
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13879: Change src/msdos.c from raw-text to ASCII
From: Eli Zaretskii <[email-masked]>
To: Paul Eggert <[email-masked]>
Cc: [email-masked]
Date: Wed, 06 Mar 2013 18:23:21 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Tue, 05 Mar 2013 12:03:00 -0800
> From: Paul Eggert <[email-masked]>
> CC: [email-masked]
> 
> On 03/05/13 10:49, Eli Zaretskii wrote:
> >  Is it OK to use some suitable DOS codepage encoding for
> > this file instead of UTF-8?  If yes, I will make a suitable change.
> 
> Yes, thanks, that'd make it clearer what's going on.

Done in trunk revision 111956.

Subject: Change src/msdos.c from raw-text to ASCII
From: Paul Eggert <[email-masked]>
To: [email-masked]
Cc: Eli Zaretskii <[email-masked]>
Date: Tue, 05 Mar 2013 09:43:07 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

In my attempt to make the Emacs sources UTF-8-safe, I ran across
src/msdos.c, which is currently raw-text because
it has string literals containing bytes with the top
bit set.  There's an easy way to make this ASCII, e.g.,
use the string literal "\375" rather than "X" (where X is
the actual byte with octal code 375).  Attached is a proposed patch.
I'm CC'ing this to Eli since this affects the MS-DOS port.
=== modified file 'src/msdos.c'
--- src/msdos.c	2013-02-17 16:49:27 +0000
+++ src/msdos.c	2013-03-05 17:38:22 +0000
@@ -1,4 +1,4 @@
-/* MS-DOS specific C utilities.          -*- coding: raw-text -*-
+/* MS-DOS specific C utilities.          -*- coding: us-ascii -*-
 
 Copyright (C) 1993-1997, 1999-2013 Free Software Foundation, Inc.
 
@@ -1976,11 +1976,11 @@
 static struct dos_keyboard_map fr_keyboard = {
 /* 0         1         2         3         4         5      */
 /* 012 3456789012345678901234567890123456789012345678901234 */
-  "ý&‚\",(-Š_€…)=  azertyuiop^$   qsdfghjklm—*   wxcvbnm;:!  ",
+  "\375&\202\",(-\212_\200\205)=  azertyuiop^$   qsdfghjklm\227*   wxcvbnm;:!  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
-  " 1234567890ø+  AZERTYUIOPùœ   QSDFGHJKLM%æ   WXCVBN?./õ  ",
+  " 1234567890\370+  AZERTYUIOP\371\234   QSDFGHJKLM%\346   WXCVBN?./\365  ",
 /* 01234567 89012345678901234567890123456789012345678901234 */
-  "  ~#{[|`\\^@]}             Ï                              ",
+  "  ~#{[|`\\^@]}             \317                              ",
   0				/* no translate table */
 };
 
@@ -2000,9 +2000,9 @@
 static struct dos_keyboard_map it_keyboard = {
 /* 0          1         2         3         4         5     */
 /* 0 123456789012345678901234567890123456789012345678901234 */
-  "\\1234567890'�< qwertyuiopŠ+>  asdfghjkl•…—   zxcvbnm,.-  ",
+  "\\1234567890'\215< qwertyuiop\212+>  asdfghjkl\225\205\227   zxcvbnm,.-  ",
 /* 01 23456789012345678901234567890123456789012345678901234 */
-  "|!\"œ$%&/()=?^> QWERTYUIOP‚*   ASDFGHJKL‡øõ   ZXCVBNM;:_  ",
+  "|!\"\234$%&/()=?^> QWERTYUIOP\202*   ASDFGHJKL\207\370\365   ZXCVBNM;:_  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
   "        {}~`             []             @#               ",
   it_kbd_translate_table
@@ -2011,11 +2011,11 @@
 static struct dos_keyboard_map dk_keyboard = {
 /* 0         1         2         3         4         5      */
 /* 0123456789012345678901234567890123456789012345678901234 */
-  "«1234567890+|  qwertyuiop†~   asdfghjkl‘›'   zxcvbnm,.-  ",
+  "\2531234567890+|  qwertyuiop\206~   asdfghjkl\221\233'   zxcvbnm,.-  ",
 /* 01 23456789012345678901234567890123456789012345678901234 */
-  "õ!\"#$%&/()=?`  QWERTYUIOP�^   ASDFGHJKL’�*   ZXCVBNM;:_  ",
+  "\365!\"#$%&/()=?`  QWERTYUIOP\217^   ASDFGHJKL\222\235*   ZXCVBNM;:_  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
-  "  @œ$  {[]} |                                             ",
+  "  @\234$  {[]} |                                             ",
   0				/* no translate table */
 };