dealing with unicode
Posted: 02 Mar 2024 20:36
I have a small text file that has no BOM. When I look at it with F11 (or in the F12 preview) all is well.
But trying to
What's even more confusing - also with mode
But something seems to be wrong with
---wrong---
assertion failed: dt TMatch 22 ns.⎕ATX fn â at ⎕SE.LinkTest.test_attributes[16]
test_attributes[16] assert'dt TMatch 22 ns.⎕ATX fn'
∧
---correct---
assertion failed: dt TMatch 22 ns.⎕ATX fn ⍝ at ⎕SE.LinkTest.test_attributes[16]
test_attributes[16] assert'dt TMatch 22 ns.⎕ATX fn'
∧
-----
But trying to
::copytext readfile(<curitem>) looses the UTF-8 somewhere. Also ::msg readfile(<curitem>) shows the data incorrectly.What's even more confusing - also with mode
"ru" it displays the data wrong - but I did check ::msg "⍳⍴⍵" and that worked - so clearly msg can deal with unicode.But something seems to be wrong with
readfile with and without auto-detection...---wrong---
assertion failed: dt TMatch 22 ns.⎕ATX fn â at ⎕SE.LinkTest.test_attributes[16]
test_attributes[16] assert'dt TMatch 22 ns.⎕ATX fn'
∧
---correct---
assertion failed: dt TMatch 22 ns.⎕ATX fn ⍝ at ⎕SE.LinkTest.test_attributes[16]
test_attributes[16] assert'dt TMatch 22 ns.⎕ATX fn'
∧
-----