Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 53b28a2284d695d5ff3f0dd7c63ab27a8cb99520ea875d46d707cf6521b028f7
Ticket: d10d6ddf295864389294b966163a23a58b9a1e72
UTF-16 Unicode escapes should continue to work in version 9.0
User & Date: bhaible on 2024-08-12 16:55:39
Changes

  1. icomment:
    > There's a portable way to specify an emoji:
    > % encoding convertfrom utf-8 \xF0\x9F\x98\x81
    > 😁
    
    So, what you suggest is to replace string literals with expressions. So, to write, e.g. in a message catalog file,
    
    ::msgcat::mcset fr "smiley" [expr { $tcl_version < 9 ? "\ud83d\ude03" : "\U0001F603" }]
    
    Is that what you meant?
    
    In my use-case it would work. I don't know whether it would work anywhere where string literals can be used.
    
    But in any case, the migration cost (from version 8.6 to 9.0) is non-negligible for Tcl users.
    
  2. login: "bhaible"
  3. mimetype: "text/plain"