diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-17 09:51:38 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-17 09:51:38 (GMT) |
| commit | cf4140cc14a1800d2a74e73545fd86c49f3a1e73 (patch) | |
| tree | e90b82a0260d5ead97aeff9dc4e483bccb3f92de /generic/tcl.h | |
| parent | 2041f4450bf1aca29472f00ab21b13448bcde2d4 (diff) | |
| parent | 6ec7e10a1634a0a9c10ed2cf90072ba723d701ce (diff) | |
| download | tcl-cf4140cc14a1800d2a74e73545fd86c49f3a1e73.zip tcl-cf4140cc14a1800d2a74e73545fd86c49f3a1e73.tar.gz tcl-cf4140cc14a1800d2a74e73545fd86c49f3a1e73.tar.bz2 | |
TIP #601: Make "encoding convertto/convertfrom" throw exceptions
Diffstat (limited to 'generic/tcl.h')
| -rw-r--r-- | generic/tcl.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index b82cf0a..ef0fa75 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2059,10 +2059,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 @@ -2077,6 +2077,18 @@ typedef struct Tcl_EncodingType { * content. Otherwise, the number of chars * produced is controlled only by other limiting * factors. + * TCL_ENCODING_MODIFIED - Convert NULL bytes to \xC0\x80 in stead of + * 0x00. Only valid for "utf-8" and "cesu-8". + * This flag is implicit for external -> internal conversions, + * optional for internal -> external conversions. + * TCL_ENCODING_NOCOMPLAIN - 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 @@ -2084,6 +2096,8 @@ typedef struct Tcl_EncodingType { #define TCL_ENCODING_STOPONERROR 0x04 #define TCL_ENCODING_NO_TERMINATE 0x08 #define TCL_ENCODING_CHAR_LIMIT 0x10 +#define TCL_ENCODING_MODIFIED 0x20 +#define TCL_ENCODING_NOCOMPLAIN 0x40 /* * The following definitions are the error codes returned by the conversion |
