APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1509188104 -3600
# Sat Oct 28 11:55:04 2017 +0100
# Node ID 75c2debd5be652fa2c9959d9a7b01c66248d3712
# Parent 32aa4c87fa7f91e059717f5a88300469d7c3e9d7
Accept error octets on encoding, "multibyte" coding systems, file-coding.c
src/ChangeLog addition:
2017-10-28 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (handle_possible_error_octet):
Pass CONVERR_USE_PRIVATE to ichar_to_unicode(), allowing it to
return an error octet, and allowing us to preserve error octets
seen in external data.
* mule-coding.c (multibyte_encode):
Document a consideration about which error octets to pass through.
diff -r 32aa4c87fa7f -r 75c2debd5be6 src/ChangeLog
--- a/src/ChangeLog Thu Oct 26 09:34:51 2017 +0100
+++ b/src/ChangeLog Sat Oct 28 11:55:04 2017 +0100
@@ -1,3 +1,12 @@
+2017-10-28 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * file-coding.c (handle_possible_error_octet):
+ Pass CONVERR_USE_PRIVATE to ichar_to_unicode(), allowing it to
+ return an error octet, and allowing us to preserve error octets
+ seen in external data.
+ * mule-coding.c (multibyte_encode):
+ Document a consideration about which error octets to pass through.
+
2017-10-26 Aidan Kehoe <kehoea(a)parhasard.net>
* mule-coding.c (iso2022_encode):
diff -r 32aa4c87fa7f -r 75c2debd5be6 src/file-coding.c
--- a/src/file-coding.c Thu Oct 26 09:34:51 2017 +0100
+++ b/src/file-coding.c Sat Oct 28 11:55:04 2017 +0100
@@ -2989,7 +2989,7 @@
struct coding_stream *str, const UExtbyte *src,
unsigned_char_dynarr *dst, int *code_out)
{
- int code = ichar_to_unicode (ich, CONVERR_FAIL);
+ int code = ichar_to_unicode (ich, CONVERR_USE_PRIVATE);
if (code >= 0)
{
if (code_out)
diff -r 32aa4c87fa7f -r 75c2debd5be6 src/mule-coding.c
--- a/src/mule-coding.c Thu Oct 26 09:34:51 2017 +0100
+++ b/src/mule-coding.c Sat Oct 28 11:55:04 2017 +0100
@@ -297,6 +297,9 @@
if (handle_possible_error_octet (ich, str, src, dst, NULL))
{
+ /* #### This should behave differently depending on whether this
+ error octet can be produced by multibyte_decode() with this
+ coding system, or not. */
ENCODING_ERROR_RETURN_OR_CONTINUE (str, src);
}
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date