diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-18 17:34:25 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-18 17:34:25 (GMT) |
commit | 933e1c8e0cfca02300b0a184dab6d4c7e48cb499 (patch) | |
tree | f23de35c6234cb8358fd58d7c67964572782da98 /tests/encoding.test | |
parent | 3d2dc708451191d04cca00561cbed0295a407b11 (diff) | |
parent | c731ca1ffdd3e7cc90cf064ac89b2f71551958ce (diff) | |
download | tcl-933e1c8e0cfca02300b0a184dab6d4c7e48cb499.zip tcl-933e1c8e0cfca02300b0a184dab6d4c7e48cb499.tar.gz tcl-933e1c8e0cfca02300b0a184dab6d4c7e48cb499.tar.bz2 |
Merge 8.7 to pick up UTF-8 encoding fix
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index de6b87b..36728d1 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -768,7 +768,7 @@ test encoding-24.14 {Parse valid or invalid utf-8} { } 1 test encoding-24.15 {Parse valid or invalid utf-8} -constraints deprecated -body { encoding convertfrom utf-8 "Z\xE0\x80" -} -result Z\xE0\x80 +} -result Z\xE0\u20AC test encoding-24.16 {Parse valid or invalid utf-8} -constraints testbytestring -body { encoding convertto utf-8 [testbytestring "Z\u4343\x80"] } -returnCodes 1 -result {expected byte sequence but character 1 was '䍃' (U+004343)} @@ -847,6 +847,12 @@ test encoding-24.40 {Try to generate invalid utf-8 with -profile tcl8} -body { test encoding-24.41 {Parse invalid utf-8 with -profile strict} -body { encoding convertfrom -profile strict utf-8 \xED\xA0\x80\xED\xB0\x80 } -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xED'} +test encoding-24.42 {Parse invalid utf-8, fallback to cp1252 [885c86a9a0]} -body { + encoding convertfrom -nocomplain utf-8 \xF0\x80\x80\x80 +} -result \xF0\u20AC\u20AC\u20AC +test encoding-24.43 {Parse invalid utf-8, fallback to cp1252 [885c86a9a0]} -body { + encoding convertfrom -nocomplain utf-8 \x80 +} -result \u20AC file delete [file join [temporaryDirectory] iso2022.txt] |