Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-04-21
15:42 • Closed ticket [1334273fff]: encoding convertfrom falls through to iso8859-1</i... artifact: c29c084b1c user: apnadkarni
2005-10-22
09:38 • Ticket [1334273fff]: 5 changes artifact: 1c4d4ff1cc user: msofer
2005-10-21
15:30 • New ticket [1334273fff]. artifact: 3d757b1b65 user: nobody

[encoding convertfrom] falls through to iso8859-1

Closed / Out of Date1334273fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 226 days ago
Descriptionplain2005-10-21 15:30:53
When the .enc file of a one-byte encoding specifies that 
a code point is unassigned (with 0000), [encoding 
convertfrom] seems to return the Unicode of iso8859-1 
instead of 0. man Tcl_GetEncoding(): "If a character in 
the encoding maps to the Unicode character 0000, it 
means that the character doesn't actually exist. " 

Example: iso8859-6.enc contains 0000 for \xFF (last 
row, last four digits). But

% scan [encoding convertfrom iso8859-6 \xFF] %c
255

Expected behavior: 0

Workaround at http://wiki.tcl.tk/14874 (reads enc file 
pedestrianly, excerpts the 4-digit substring from there...)

[email protected]
msoferplain2005-10-22 09:38:17
Logged In: YES 
user_id=148712

See also [RFE 535705]
apnadkarniplain2026-04-21 15:42:46
Closing. Tcl 9 raises an error (correctly) and too late to fix for Tcl 8.
Log in (anonymous is fine) to add a comment.