Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c69344393a2fd62e50b0aff7061bb17421c351ba0045296625aa217fd6f1e081
Ticket: 5b5ba0aa0d0c78636f2fef90558e2b84c3e4bae4
macJapanese encoding is incomplete
User & Date: gingerbeardman on 2021-11-15 21:01:14
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    It seems that the macJapan encoding is incomplete in that it does not deal with the full range of characters as outlined in the spec.
    
    https://unicode.org/Public/MAPPINGS/VENDORS/APPLE/JAPANESE.TXT
    
    Background: I am spitting out raw filename data from Japanese CD-ROMs (using hfsutils' hls command) and receive the following stream of bytes:
    3A90 BB95 6991 CC8C B194 C53A
    
    (I list the byte streams so you can easily reproduce this data)
    
    these bytes should be encoded to:
    3AE8 A3BD E593 81E4 BD93 E9A8 93E7 8988 3A0A
    
    (the correct UTF-8 representation is :製品体験版: the commas are part of the text)
    
    but using Tcl [encoding convertfrom macJapan] it is encoded to:
    3AE8 A3BD E593 81C2 910C EFBD B1E7 8988 3A0A
    
    The problematic bytes in this example are:
    
    91CC (should be mapped to 4F53, but Tcl maps to E4BD 93)
    8CB1 (should be mapped to 9A13, but Tcl maps to E9A8 93)
    
    It's odd that they are encoded into three bytes?
    
    These characters are in the range covered by JIS X0208-1990, but please be aware I have not done any investigation to see how deep this problem goes.
    
    Finally, I see in https://core.tcl-lang.org/tcl/info/535705ffffffffff that encoding problems will generate errors in future, which is great! That would really help.
    
  5. foundin changed to: "8.5.9"
  6. is_private changed to: "0"
  7. login: "gingerbeardman"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "58d078b5c35ea0d0420ca553025ffab67e7e91f5"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "gingerbeardman"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "macJapanese encoding is incomplete"
  16. type changed to: "Bug"