Skip to content
Tcl Source Code View Ticket
Login

View Ticket

bug in "encoding convertto utf-8"

Closed / Out of Date07b3bc4cbe2b2ab03f91e716a40b5c4a6be57a7cCreated 13 years agoUpdated 8 years ago
Descriptionplain2013-10-22 09:39:45
I believe I found a bug in the "encoding convertto utf-8" command.

It converts the letter "Ø" (Uppercase O with a slash, \u00d8) to wrong code, at least if I write the string to a file without "fconfiguring" the file.

The bug drove me crazy today, as I couldn't make my tlc-generated and utf-8-encoded xml file to parse.

I resolved the problem by using fconfigure and skip the encoding of each individual string.  It might be that the current file configuration was incopatible with the utf-encoded string.  I haven't studiet this in detail, but fortunately I found a woraround to the problem.
dkfhtml2013-10-22 14:38:49

Why were you using encoding convertto utf-8 during the process of producing output to a channel? It's normally enough to just chan configure it and then write characters. Or were you double-encoding it (which would be a script bug)?

jan.nijtmans Closed ticket [07b3bc4cbe]. [History diff]2019-02-19 15:49:13
Log in (anonymous is fine) to add a comment.