| Ticket UUID: | 52b83aa279de717a047f80c71945b4dc94b15912 | ||
| Title: | tcl9.0 finds wide character but doesn't report line number | ||
| Type: | Bug | Created on: | 2023-11-23 22:15:56 |
| Submitter: | anonymous | Assigned to: | nobody |
| Subsystem: | 45. Parsing and Eval | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2023-11-24 09:07:51 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | 9.0 prebeta | ||
| Description: | ||||
I had a very long tcl file full of code snippets, inside
if { 0 } { ;#comment
...
}
which I use to test out new code. Somehow it got 2 chars corrupted into the byte 0xB0 and so it gave the error:
couldn't read file: <filename> invalid or incomplete multibyte or wide character
I guess this is new to tcl9.0 as prior versions, even 8.7, don't mind this in the file.
The problem is, however, that tcl doesn't provide the line number of where the problem is, and so it took a tedious binary chop/search to find the line that had got corrupted. And since there were 2 places, it was more difficult to find, luckily my editor was able to search for the mangled byte.
I think that is a bug and it should be fixed.
| ||||
| User Comments: | ||||
oehhar added on 2023-11-24 09:07:51:
Hi, thanks for testing, great ! The issue might also be, that the source was not encoded with utf-8. The encoding of source changed from the system encoding to utf-8. The old behaviour may be used by "source -encoding ... file.tcl". And a more verbose message where to find the issue would be great. For sure, this is possible. Take care, Harald | ||||
