Tk Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 0a3d799a6d962b46b9e7601782d16198f579b74
Title: option db rc files in non utf-8 encoding are not portable
Type: Bug Version: 8.5.19, 8.6.4
Submitter: oehhar Created on: 2016-02-03 08:05:05
Subsystem: 57. [option] Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-02-08 16:40:49
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2016-02-08 16:40:49
Description: (text/x-fossil-wiki)
<h1>Option Files in non utf-8 encoding are not portable</h1>
As pointed out on the clt-list, option files in non utf-8 encodings are not portable.

<h1>BWidget (mis)use</h1>
BWidget (up to version 1.9.9) (mis)uses the option data base for message catalogues and the files were originally encoded in ISO-Latin 1.
This breaks on systems with a system encoding of utf-8 like recent Linux systems.
Details are here: [https://core.tcl.tk/bwidget/info/6c91e43d76c2cc23]

<h1>Fixes breaking current BWidget</h1>
Christian Werner/Jan Nijtmans proposed a patch for tcl8.5.19/tcl8.6.5 which used the system encoding and uses utf-8 when a BOM is present, breaking encoding files in utf-8 without BOM (which worked so far).

Trunk: [16df5a3f], core-8-5-branch [ad879218]

Donald Port have done two background posts on what is happening on clt:
   *   Background: [http://code.activestate.com/lists/tcl-core/15353/]
   *   Bug itself: [http://code.activestate.com/lists/tcl-core/15354/]

<h1>Proposed solutions</h1>

Harald Oehlmann limited personal view [http://code.activestate.com/lists/tcl-core/15356/]
   *   Revert change on Tk8.5.19
   *   Use utf-8 only for Tk8.6.5

Jan Nijtmans implemented this for trunk [f42bec2656f3b663]
User Comments: jan.nijtmans added on 2016-02-08 16:40:49:
Committed now to trunk. Will not be back-ported to 8.5, as discussed.

Thanks!