Mercurial > hg > xemacs-beta
comparison src/mule-coding.c @ 5100:3d91f0b64469
fix bad bug with escape-quoted handling
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-03-05 Ben Wing <ben@xemacs.org>
* mule-coding.c:
* mule-coding.c (iso2022_encode):
Horrible bug: `escape-quoted' was failing to escape-quote special
characters in the 0x80 - 0x9F range. Who knows what breakage ensued?
SAME BUG IN XEMACS 21.4; MUST BE FIXED THERE TOO.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Mar 2010 07:16:22 -0600 |
parents | 16112448d484 |
children | 6c6d78781d59 |
comparison
equal
deleted
inserted
replaced
5097:4a6b680a9577 | 5100:3d91f0b64469 |
---|---|
1 /* Conversion functions for I18N encodings, but not Unicode (in separate file). | 1 /* Conversion functions for I18N encodings, but not Unicode (in separate file). |
2 Copyright (C) 1991, 1995 Free Software Foundation, Inc. | 2 Copyright (C) 1991, 1995 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Sun Microsystems, Inc. | 3 Copyright (C) 1995 Sun Microsystems, Inc. |
4 Copyright (C) 2000, 2001, 2002 Ben Wing. | 4 Copyright (C) 2000, 2001, 2002, 2010 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
2543 charmask = (half == 0 ? 0x7F : 0xFF); | 2543 charmask = (half == 0 ? 0x7F : 0xFF); |
2544 char_boundary = 1; | 2544 char_boundary = 1; |
2545 if (EQ (charset, Vcharset_control_1)) | 2545 if (EQ (charset, Vcharset_control_1)) |
2546 { | 2546 { |
2547 if (XCODING_SYSTEM_ISO2022_ESCAPE_QUOTED (codesys) | 2547 if (XCODING_SYSTEM_ISO2022_ESCAPE_QUOTED (codesys) |
2548 && fit_to_be_escape_quoted (c)) | 2548 && fit_to_be_escape_quoted (c - 0x20)) |
2549 Dynarr_add (dst, ISO_CODE_ESC); | 2549 Dynarr_add (dst, ISO_CODE_ESC); |
2550 /* you asked for it ... */ | 2550 /* you asked for it ... */ |
2551 Dynarr_add (dst, c - 0x20); | 2551 Dynarr_add (dst, c - 0x20); |
2552 } | 2552 } |
2553 #ifndef ENABLE_COMPOSITE_CHARS | 2553 #ifndef ENABLE_COMPOSITE_CHARS |