Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Bad backslash substitution

Closed / Invalid218323ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:09
OriginalBugID: 3832 Bug
Version: 8.2.2
SubmitDate: '1999-12-09'
LastModified: '1999-12-11'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Windows NT
OSVersion: Windows NT 4 service pack 4
Machine: Toshiba Tecra 780
FixedDate: '2000-10-25'
ClosedDate: '1999-12-11'


Name: Tony Olsson

ReproducibleScript:
Using backslash substitution with octal, hexadecimal or unicode does not seem to work on Windows NT. It works on UNIX and if inserting a character with that code. The problem was found when trying to convert (old code actually) Mac-specific characters to ISO.8859.1 characters representing some Swedish native characters. 

     string map {\205 Ö \232 ö \200 Ä \212 ä \201 Å \214 å} $line 

works on UNIX but not on PC.

ObservedBehavior:
The backslash substitution does not work the same on UNIX and Windows NT. It does not seem to work correctly on Windows NT.

DesiredBehavior:
The backslash substituition should work the same on both UNIX and Windows NT.



Please be careful on how the line is created in NT.  If I do it
within Tcl, then it works as expect on NT:

(tkcon) 49 % set line "\205 \200 \214 \232 \205"
? ? ? ? ?
(tkcon) 50 % string map {\205 Ö \232 ö \200 Ä \212 ä \201 Å \214 å} $line
Ö Ä å ö Ö

Which indicates that it works.  It is possible that the user is
being hit by some auto-conversion when the file gets to NT, or
perhaps they need to open the file in binary or some other encoding. 
-- 12/11/1999 hobbs
welch Closed ticket [218323ffff]. [History diff]2000-10-26 08:19:01
dgp Ticket [218323ffff]: 4 changes [History diff]2001-04-06 03:28:29
Log in (anonymous is fine) to add a comment.