Tk Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
2016-02-08
16:40 Closed ticket [0a3d799a]: option db rc files in non utf-8 encoding are not portable plus 7 other changes artifact: ebf500a5 user: jan.nijtmans
16:39
Fix [0a3d799a6d]: option db rc files in non utf-8 encoding are not portable. check-in: b387eb0c user: jan.nijtmans tags: trunk
2016-02-03
08:48 Ticket [477949ff] option readfile cannot use multibytes status still Closed with 4 other changes artifact: 7137652c user: jan.nijtmans
08:45
Backout [477949] for Tk 8.5, after discussion in TclCore mailing list: option readfile cannot use multibytes. Ticket [0a3d799a]

To clarify a bit, what we discovered was that [[option readfile]] as found in all Tk releases up to and including 8.5.18 is already able to read in the whole BMP, so long as the file is stored in the encoding utf-8. The classic ASCII subset is fine. utf-8 is fine. Other encodings are at best non-portable.

What [477949] did was to add support for files stored in [[encoding system]] but at the expense of breaking the support for the files stored in utf-8. Not the right outcome for a patch release. check-in: 4529e367 user: jan.nijtmans tags: core-8-5-branch

08:05 New ticket [0a3d799a] option db rc files in non utf-8 encoding are not portable. artifact: 5357ed59 user: oehhar

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:

Option Files in non utf-8 encoding are not portable

As pointed out on the clt-list, option files in non utf-8 encodings are not portable.

BWidget (mis)use

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

Fixes breaking current BWidget

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:

Proposed solutions

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!