Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tcl_platform(user) is not in UTF-8 format

Closed / Fixed685926ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-02-13 13:56:27
Problem - ActiveTcl8.4.1.0 - Win XP - (french version)

set tcl_platform(user)
Propriétaire
puts stdout "-$tcl_platform(user)-"
-Propriétaire-
string bytelength "Propriétaire"
13
string bytelength $tcl_platform(user)
12

string compare $tcl_platform(user) "Propriétaire"
1

Workaround

set username [encoding convertto /tcl/encoding/cp1252 
$tcl_platform(user)]
Propriétaire
string bytelength $username
13

string compare $username "Propriétaire"
0
dkf Ticket [685926ffff]: 1 change [History diff]2003-02-13 21:08:22
dgpplain2003-02-13 23:04:24
Logged In: YES 
user_id=80530

Apparently improper handling of the
value returned from GetUserName
in TclpSetVariables() in tclWinInit.c.

Kevin, can you advise whether the
obvious fix will work?

Meanwhile, a better workaround is
to set the environment variable
USERNAME to the value you
want for tcl_platform(user).
kennykbplain2003-02-14 06:17:08
File Added - 42370: 685926.patch

Logged In: YES 
user_id=99768

Patch attached.
kennykbplain2003-02-14 07:04:53
Logged In: YES 
user_id=99768

fix committed
Log in (anonymous is fine) to add a comment.

Attachments: