all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13879: Change src/msdos.c from raw-text to ASCII
@ 2013-03-05 17:43 Paul Eggert
  2013-03-05 18:49 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2013-03-05 17:43 UTC (permalink / raw)
  To: 13879

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: msdos.txt --]
[-- Type: text/plain; charset=us-ascii; name="msdos.txt", Size: 2613 bytes --]

=== 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 */
 };
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13879: Change src/msdos.c from raw-text to ASCII
  2013-03-05 17:43 bug#13879: Change src/msdos.c from raw-text to ASCII Paul Eggert
@ 2013-03-05 18:49 ` Eli Zaretskii
  2013-03-05 20:03   ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2013-03-05 18:49 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 13879

> Date: Tue, 05 Mar 2013 09:43:07 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: Eli Zaretskii <eliz@gnu.org>
> 
> 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.

Thanks, but I would like to make a different change there.  These
bytes are used in the definitions of non-US keyboard layouts, and it
is convenient to see the actual characters show up there, not escape
sequences.  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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13879: Change src/msdos.c from raw-text to ASCII
  2013-03-05 18:49 ` Eli Zaretskii
@ 2013-03-05 20:03   ` Paul Eggert
  2013-03-06 16:23     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2013-03-05 20:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 13879

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13879: Change src/msdos.c from raw-text to ASCII
  2013-03-05 20:03   ` Paul Eggert
@ 2013-03-06 16:23     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2013-03-06 16:23 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 13879-done

> Date: Tue, 05 Mar 2013 12:03:00 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: bug-gnu-emacs@gnu.org
> 
> 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-06 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 17:43 bug#13879: Change src/msdos.c from raw-text to ASCII Paul Eggert
2013-03-05 18:49 ` Eli Zaretskii
2013-03-05 20:03   ` Paul Eggert
2013-03-06 16:23     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.