From: SourceForge.net <no...@so...> - 2012-02-02 17:50:45
|
Bugs item #3483277, was opened at 2012-02-02 08:53 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3483277&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 11. Conversions from String Group: obsolete: 8.5.10 >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Deepali (dalkunte) >Assigned to: Don Porter (dgp) Summary: Problem with command "string map" in Tcl 8.5 Initial Comment: Hi We are using TCL as an integrated scripting language in our application. But after upgrading TCL version from 8.3 to 8.5 we have started facing problem with the command “string map” below is code where the output of “string map” is incorrect. ------------------------------------------------------- set a "TEST1°TEST2°TEST3°TEST4°TEST5°A-B-C-D-E-F" puts $a #content of the variable a : TEST1°TEST2°TEST3°TEST4°TEST5°A-B-C-D-E-F set a [string map { "-" ";" } $a] puts $a #content of the variable a : TEST1ï¾°TEST2ï¾°TEST3ï¾°TEST4ï¾°TEST5ï¾°A;B;C;D;E;F ----------------------------------------------------------- In the output of "string map" degree sign (°) is getting converted into ï¾°. Similar code was working correctly with Tcl version 8.3. Thanks ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2012-02-02 09:50 Message: I suspect your script is not in the proper encoding. How do the commands above reach the interpreter? Are they stored in a file, and brought in with the [source] command? If so, is that file stored in the encoding returned by the [encoding system] command? If not, it's your job to tell [source] your script file is not in the default encoding by passing the proper -encoding value. The alternative, which is the more common approach, is to write your script files using only ASCII characters, and use \uHHHH substitution to encode any literal characters in your script outside that character range. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3483277&group_id=10894 |