diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-21 14:19:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-21 14:19:59 (GMT) |
commit | 0726ab17a254f87dcee64add378c07c5f893bb7c (patch) | |
tree | e95908ffb9e861b5d612623414123de1f5baaebd /generic/tclEncoding.c | |
parent | fbc1385f022d052dc79c90424606cb96b8964b93 (diff) | |
parent | b39c277e12e6135a57caca867bb94569bd4bbb10 (diff) | |
download | tcl-0726ab17a254f87dcee64add378c07c5f893bb7c.zip tcl-0726ab17a254f87dcee64add378c07c5f893bb7c.tar.gz tcl-0726ab17a254f87dcee64add378c07c5f893bb7c.tar.bz2 |
Merge 9.0
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index d735fe3..c8c7215 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1068,6 +1068,7 @@ Tcl_CreateEncoding( *------------------------------------------------------------------------- */ +#undef Tcl_ExternalToUtfDString char * Tcl_ExternalToUtfDString( Tcl_Encoding encoding, /* The encoding for the source string, or NULL @@ -1078,7 +1079,7 @@ Tcl_ExternalToUtfDString( Tcl_DString *dstPtr) /* Uninitialized or free DString in which the * converted string is stored. */ { - Tcl_ExternalToUtfDStringEx(encoding, src, srcLen, 0, dstPtr); + Tcl_ExternalToUtfDStringEx(encoding, src, srcLen, TCL_ENCODING_NOCOMPLAIN, dstPtr); return Tcl_DStringValue(dstPtr); } @@ -1304,7 +1305,7 @@ Tcl_ExternalToUtf( * *------------------------------------------------------------------------- */ - +#undef Tcl_UtfToExternalDString char * Tcl_UtfToExternalDString( Tcl_Encoding encoding, /* The encoding for the converted string, or @@ -1315,7 +1316,7 @@ Tcl_UtfToExternalDString( Tcl_DString *dstPtr) /* Uninitialized or free DString in which the * converted string is stored. */ { - Tcl_UtfToExternalDStringEx(encoding, src, srcLen, 0, dstPtr); + Tcl_UtfToExternalDStringEx(encoding, src, srcLen, TCL_ENCODING_NOCOMPLAIN, dstPtr); return Tcl_DStringValue(dstPtr); } @@ -2303,7 +2304,7 @@ UtfToUtfProc( */ if (flags & TCL_ENCODING_MODIFIED) { - if (!(flags & TCL_ENCODING_NOCOMPLAIN)) { + if (!(flags & TCL_ENCODING_NOCOMPLAIN) && (flags & TCL_ENCODING_CHAR_LIMIT)) { result = TCL_CONVERT_MULTIBYTE; break; } @@ -3084,7 +3085,7 @@ TableFromUtfProc( word = fromUnicode[(ch >> 8)][ch & 0xFF]; if ((word == 0) && (ch != 0)) { - if (!(flags & TCL_ENCODING_NOCOMPLAIN)) { + if (!(flags & TCL_ENCODING_NOCOMPLAIN) && (flags & TCL_ENCODING_CHAR_LIMIT)) { result = TCL_CONVERT_UNKNOWN; break; } |