Overview
| Artifact ID: | ec7ece5e3706f151718ed7b6df4200ef53a637b8757e499b76a9c8836f484b71 |
|---|---|
| Ticket: | f2e924e88181d602cb3b558afba3dc2995ea11a6
Error reading fixed number of characters from UTF16-LE file containing non-BMP chars |
| User & Date: | apnadkarni on 2024-08-20 05:37:13 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
The following writes emoji to a file in UTF16LE and reads the file back successfully. However, reads of a specific number of characters fails. ``` % set fd [open utf16.txt wb] file26c91f9a4c0 % puts -nonewline $fd [encoding convertto utf-16le A\U1F600] % close $fd % set fd [open utf16.txt]; fconfigure $fd -encoding utf-16le % read $fd A😀 % close $fd % set fd [open utf16.txt]; fconfigure $fd -encoding utf-16le % read $fd 2 error reading "file26c937c7370": invalid or incomplete multibyte or wide character % close $fd ``` Note the full file read succeeds but the read of two chars fails. Marked as important because UTF-16LE is native to Win32 API.
- foundin changed to: "9.0b3"
- is_private changed to: "0"
- login: "apnadkarni"
- priority changed to: "5 Medium"
- private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "apnadkarni"
- subsystem changed to: "- New Builtin Commands"
- title changed to:
Error reading fixed number of characters from UTF16-LE file containing non-BMP chars
- type changed to: "Bug"