Menu

#48 Trying to use unicode characters in .edef causes error, reports wrong character

1.55.2200
closed-fixed
nobody
None
5
2020-05-30
2020-05-28
No

Assembling the following example as String.asm

.enc "SJIS"
.edef "ぁ", [$82, $9F]

.text "ぁぁ"

results in

./64tass -a -Wall -i String.asm -o String2200.bin
64tass Turbo Assembler Macro V1.55.2200
64TASS comes with ABSOLUTELY NO WARRANTY; This is free software, and you
are welcome to redistribute it under certain conditions; See LICENSE!

Assembling file:   String.asm
String.asm:4:7: error: can't encode character 'Ⴠ' ($10c0) in encoding 'SJIS'
 .text "ぁぁ"
       ^
Error messages:    1
Warning messages:  None
Passes:            2

Things are assembled correctly and without error when the text contains only one character (.text "ぁ"), and gives a different (still wrong) character in the error when the text contains more than two characters (.text "ぁぁぁ" results in can't encode character 'ဣ' ($1023) in encoding 'SJIS').

It assembles in releases 1.54.1900 and 1.54.1864 correctly and without error, but errors in 1.55.2200 and 1.55.2176.

Discussion

  • Soci/Singular

    Soci/Singular - 2020-05-29

    Thanks! Should be working now in r2217.

    It's because I've changed the search of escapes and got the backtracking wrong. For some reason it was a single byte always so it failed every time a multi byte character followed a valid escape sequence.

     
  • Soci/Singular

    Soci/Singular - 2020-05-29
    • status: open --> pending-fixed
     
  • Zane Avernathy

    Zane Avernathy - 2020-05-30

    Seems to be working properly, thank you!

     
  • Soci/Singular

    Soci/Singular - 2020-05-30
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.