I wanted to be about to write UTF-8 to the terminal without enabling UTF8 support for VistA in general.
After hours of digging on this issue, and with the input of posters on the EVERYTHING MUMPS board, I have a general purpose routine that will output UTF8 chars, as
per demo below
CHARDEMO ;
USE $P:(CHSET="UTF-8")
NEW IDX FOR IDX=9472:1:9580 DO
. WRITE IDX,": "
. DO UTF8WRITE^TMGSTUTL(IDX)
. W !
QUIT
yottadb>DO CHARDEMO^TMGTEST
-snip-
9487: ┏
9488: ┐
9489: ┑
9490: ┒
9491: ┓
9492: └
9493: ┕
9494: ┖
9495: ┗
9496: ┘
9497: ┙
9498: ┚
-snip-
Along
the way I had to argue with Google Bard which was kind of helpful
because it pointed me in the right direction, but also VERY frustrating
because it can't count the numbers of bits used in constructing UTF8
byte strings. Wikipedia saved the day, here:
https://en.wikipedia.org/wiki/UTF-8
Kevin