diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-01 13:50:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-01 13:50:21 (GMT) |
commit | 6941f99c78c730b92f232078e1aa3bad1b84ae1c (patch) | |
tree | 817df17f41adec7933eebf87ff8549ec8ee8181b /generic/tcl.h | |
parent | 2f867a435f47f0a0b236c62f60108c2a366e8d86 (diff) | |
download | tcl-6941f99c78c730b92f232078e1aa3bad1b84ae1c.zip tcl-6941f99c78c730b92f232078e1aa3bad1b84ae1c.tar.gz tcl-6941f99c78c730b92f232078e1aa3bad1b84ae1c.tar.bz2 |
Add experimental "-nothrow" option to encoding convertfrom|convertto. If compiled with -DTCL_NO_DEPRECATED (meant for Tcl 9.0), -stoponerror is the default for all IO
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index dfb4c3a..f6c6730 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2056,10 +2056,10 @@ typedef struct Tcl_EncodingType { * encountering an invalid byte sequence or a * source character that has no mapping in the * target encoding. If clear, the converter - * substitues the problematic character(s) with + * substitutes the problematic character(s) with * one or more "close" characters in the * destination buffer and then continues to - * convert the source. + * convert the source. Only for Tcl 8.x. * TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf does not append a * terminating NUL byte. Since it does not need * an extra byte for a terminating NUL, it fills @@ -2078,6 +2078,14 @@ typedef struct Tcl_EncodingType { * 0x00. Only valid for "utf-8", "wtf-8 and "cesu-8". * This flag is implicit for external -> internal conversions, * optional for internal -> external conversions. + * TCL_ENCODING_NO_THROW - If set, the converter + * substitutes the problematic character(s) with + * one or more "close" characters in the + * destination buffer and then continues to + * convert the source. If clear, the converter returns + * immediately upon encountering an invalid byte sequence + * or a source character that has no mapping in the + * target encoding. Only for Tcl 9.x. */ #define TCL_ENCODING_START 0x01 @@ -2086,6 +2094,7 @@ typedef struct Tcl_EncodingType { #define TCL_ENCODING_NO_TERMINATE 0x08 #define TCL_ENCODING_CHAR_LIMIT 0x10 #define TCL_ENCODING_MODIFIED 0x20 +#define TCL_ENCODING_NO_THROW 0x40 /* * The following definitions are the error codes returned by the conversion |