Skip to content
Snippets Groups Projects
Commit d0650fba authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Perform unicode-to-codepage for US-ASCII input

parent 7c4d7a84
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4106 passed
......@@ -4240,6 +4240,8 @@ doterm(struct bbslist *bbs)
case 96: /* No backtick */
break;
default:
if (key < 128)
key = cpchar_from_unicode_cpoint(getcodepage(), key, key);
if (key < 256) {
/* ASCII Translation */
if (key < 123) {
......@@ -4324,6 +4326,8 @@ doterm(struct bbslist *bbs)
conn_send(ch, 1, 0);
break;
default:
if (key < 128)
key = cpchar_from_unicode_cpoint(getcodepage(), key, key);
if (key < 256) {
ch[0] = key;
conn_send(ch, 1, 0);
......@@ -4527,6 +4531,8 @@ doterm(struct bbslist *bbs)
/* FALLTHROUGH to default */
default:
if (key < 128)
key = cpchar_from_unicode_cpoint(getcodepage(), key, key);
if ((key < 256) && (key >= 0)) {
ch[0] = key;
conn_send(ch, 1, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment