Skip to content
Tcl Source Code Update of ”Unsupported icu command”
Login

Update of ”Unsupported icu command”

Overview

Artifact ID: 1f02cb2c6bae0eb0dcd13b2b359cb4e4f25111604ada2ed7f09925e2d4fa6626
Page Name:Unsupported icu command
Date: 2024-06-16 11:42:43
Original User: apnadkarni
Mimetype:text/x-markdown
Next aab79690b7fc22e84eae0439085877fc1962cdfd22fe496e4fd60ef83955a5e2
Content

This is a proposal to add a tcl::unsupported::icu command to Tcl 9. The primary goal is to help with migration of Tcl 8 scripts to Tcl 9. A (much) lesser benefit is to be able to experiment with ICU functions for handling strings and encodings.

Motivation

There are two changes in Tcl 9 that together can prevent even sourcing Tcl 8 scripts.

The two changes above mean that even a single copyright (U+00A9) character in an otherwise ASCII file will prevent the script from being loaded if the file is in ISO8859-1 encoding as is common.

In addition, text files containing non-ASCII characters that were written in [encoding system] in Tcl 8 may not be readable in Tcl 9 without an explicit fconfigure -encoding invocation. This is a particular problem on Windows as [encoding system] in Tcl 9 returns utf-8 irrespective of the user's code page setting that was used in Tcl 8.

The