mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 23:04:04 +09:00
print: emit replacement character for unknown codepoint
This commit is contained in:
@@ -332,7 +332,11 @@ print = function(str) {
|
|||||||
let cp = unicode.utf8toCodepoints(str)
|
let cp = unicode.utf8toCodepoints(str)
|
||||||
let q = unicode.getUniprint(cp[0])
|
let q = unicode.getUniprint(cp[0])
|
||||||
cp.forEach(c => {
|
cp.forEach(c => {
|
||||||
if (q[0](c)) {
|
if (q == undefined) {
|
||||||
|
con.addch(4)
|
||||||
|
con.curs_right()
|
||||||
|
}
|
||||||
|
else if (q[0](c)) {
|
||||||
q[1](c)
|
q[1](c)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user