format command does not appear able to insert 16 bit charact
Closed / Fixed218024ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:52:18
OriginalBugID: 1173 RFE
Version: 8.1b1
SubmitDate: '1999-02-09'
LastModified: '1999-02-10'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: pat
OS: Windows NT
OSVersion: 4.0sp3
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '1999-02-10'
Name:
Gerald W. Lester
Extensions:
N/A
CustomShell:
None
DesiredBehavior:
According to the 8.1b1 documentation, the %c specifier in the format command inserts an 8 bit character, however there appears no specifier to insert a 16 bit character (note %u is used to insert an unsigned integer).
Work around:
puts [subst -nocommands -novariables [format {...\u%d...} $char]]
instead of:
puts [format {...%U...} $char]
02/10/1999 10:54 - pat - Comment from Scott Stanton:
The documentation is incorrect. Format inserts a 16-bit Unicode character
into the string (in UTF-8 form). So you should be able to say something like:
set x \u3254
set y [format {....%c....} $x]
I have updated the documentation to reflect this behavior.
welch Closed ticket [218024ffff].
[History diff]2000-10-26 08:12:12
dgp Ticket [218024ffff]: 3 changes
[History diff]2001-04-17 04:36:02
Log in (anonymous is fine) to add a comment.