• this could be handy

    From Maurice Kinal@1:153/7001.2989 to Ozz Nixon on Thursday, April 25, 2019 19:27:09
    Hey Ozz!

    Below is a list of hex strings that match the utf8 equivelents for different IBM codepages. Note that most, if indeed not all, of the line/box characters in CP437 and CP866 match whereas CP850 and CP855 match the more used ones such as dec 176. I created the table using glibc's 'iconv' piped to 'xxd -ps' to come up with the hex strings. For outputting a specific decimal code for all codepages a simple bash 'echo' can be encorporated such as this for decimal 155;

    echo -e "\xc2\xa2 \xc3\xb8 \xd0\x8f \xd0\xab" -> ¢ ø Џ Ы

    Dec CP437 CP850 CP855 CP866
    =====================================
    128 c387 c387 d192 d090
    129 c3bc c3bc d082 d091
    130 c3a9 c3a9 d193 d092
    131 c3a2 c3a2 d083 d093
    132 c3a4 c3a4 d191 d094
    133 c3a0 c3a0 d081 d095
    134 c3a5 c3a5 d194 d096
    135 c3a7 c3a7 d084 d097
    136 c3aa c3aa d195 d098
    137 c3ab c3ab d085 d099
    138 c3a8 c3a8 d196 d09a
    139 c3af c3af d086 d09b
    140 c3ae c3ae d197 d09c
    141 c3ac c3ac d087 d09d
    142 c384 c384 d198 d09e
    143 c385 c385 d088 d09f
    144 c389 c389 d199 d0a0
    145 c3a6 c3a6 d089 d0a1
    146 c386 c386 d19a d0a2
    147 c3b4 c3b4 d08a d0a3
    148 c3b6 c3b6 d19b d0a4
    149 c3b2 c3b2 d08b d0a5
    150 c3bb c3bb d19c d0a6
    151 c3b9 c3b9 d08c d0a7
    152 c3bf c3bf d19e d0a8
    153 c396 c396 d08e d0a9
    154 c39c c39c d19f d0aa
    155 c2a2 c3b8 d08f d0ab
    156 c2a3 c2a3 d18e d0ac
    157 c2a5 c398 d0ae d0ad
    158 e282a7 c397 d18a d0ae
    159 c692 c692 d0aa d0af
    160 c3a1 c3a1 d0b0 d0b0
    161 c3ad c3ad d090 d0b1
    162 c3b3 c3b3 d0b1 d0b2
    163 c3ba c3ba d091 d0b3
    164 c3b1 c3b1 d186 d0b4
    165 c391 c391 d0a6 d0b5
    166 c2aa c2aa d0b4 d0b6
    167 c2ba c2ba d094 d0b7
    168 c2bf c2bf d0b5 d0b8
    169 e28c90 c2ae d095 d0b9
    170 c2ac c2ac d184 d0ba
    171 c2bd c2bd d0a4 d0bb
    172 c2bc c2bc d0b3 d0bc
    173 c2a1 c2a1 d093 d0bd
    174 c2ab c2ab c2ab d0be
    175 c2bb c2bb c2bb d0bf
    176 e29691 e29691 e29691 e29691
    177 e29692 e29692 e29692 e29692
    178 e29693 e29693 e29693 e29693
    179 e29482 e29482 e29482 e29482
    180 e294a4 e294a4 e294a4 e294a4
    181 e295a1 c381 d185 e295a1
    182 e295a2 c382 d0a5 e295a2
    183 e29596 c380 d0b8 e29596
    184 e29595 c2a9 d098 e29595
    185 e295a3 e295a3 e295a3 e295a3
    186 e29591 e29591 e29591 e29591
    187 e29597 e29597 e29597 e29597
    188 e2959d e2959d e2959d e2959d
    189 e2959c c2a2 d0b9 e2959c
    190 e2959b c2a5 d099 e2959b
    191 e29490 e29490 e29490 e29490
    192 e29494 e29494 e29494 e29494
    193 e294b4 e294b4 e294b4 e294b4
    194 e294ac e294ac e294ac e294ac
    195 e2949c e2949c e2949c e2949c
    196 e29480 e29480 e29480 e29480
    197 e294bc e294bc e294bc e294bc
    198 e2959e c3a3 d0ba e2959e
    199 e2959f c383 d09a e2959f
    200 e2959a e2959a e2959a e2959a
    201 e29594 e29594 e29594 e29594
    202 e295a9 e295a9 e295a9 e295a9
    203 e295a6 e295a6 e295a6 e295a6
    204 e295a0 e295a0 e295a0 e295a0
    205 e29590 e29590 e29590 e29590
    206 e295ac e295ac e295ac e295ac
    207 e295a7 c2a4 c2a4 e295a7
    208 e295a8 c3b0 d0bb e295a8
    209 e295a4 c390 d09b e295a4
    210 e295a5 c38a d0bc e295a5
    211 e29599 c38b d09c e29599
    212 e29598 c388 d0bd e29598
    213 e29592 c4b1 d09d e29592
    214 e29593 c38d d0be e29593
    215 e295ab c38e d09e e295ab
    216 e295aa c38f d0bf e295aa
    217 e29498 e29498 e29498 e29498
    218 e2948c e2948c e2948c e2948c
    219 e29688 e29688 e29688 e29688
    220 e29684 e29684 e29684 e29684
    221 e2968c c2a6 d09f e2968c
    222 e29690 c38c d18f e29690
    223 e29680 e29680 e29680 e29680
    224 ceb1 c393 d0af d180
    225 c39f c39f d180 d181
    226 ce93 c394 d0a0 d182
    227 cf80 c392 d181 d183
    228 cea3 c3b5 d0a1 d184
    229 cf83 c395 d182 d185
    230 c2b5 c2b5 d0a2 d186
    231 cf84 c3be d183 d187
    232 cea6 c39e d0a3 d188
    233 ce98 c39a d0b6 d189
    234 cea9 c39b d096 d18a
    235 ceb4 c399 d0b2 d18b
    236 e2889e c3bd d092 d18c
    237 cf86 c39d d18c d18d
    238 ceb5 c2af d0ac d18e
    239 e288a9 c2b4 e28496 d18f
    240 e289a1 c2ad c2ad d081
    241 c2b1 c2b1 d18b d191
    242 e289a5 e28097 d0ab d084
    243 e289a4 c2be d0b7 d194
    244 e28ca0 c2b6 d097 d087
    245 e28ca1 c2a7 d188 d197
    246 c3b7 c3b7 d0a8 d08e
    247 e28988 c2b8 d18d d19e
    248 c2b0 c2b0 d0ad c2b0
    249 e28899 c2a8 d189 e28899
    250 c2b7 c2b7 d0a9 c2b7
    251 e2889a c2b9 d187 e2889a
    252 e281bf c2b3 d0a7 e28496
    253 c2b2 c2b2 c2a7 c2a4
    254 e296a0 e296a0 e296a0 e296a0
    255 c2a0 c2a0 c2a0 c2a0
    =====================================

    Let me know what you think of the idea and I am sure we could come up with a better map if it matters. Bottom line is that you could come up with a "bottom
    line" in 8 bit codes that will be the same for the above codepages and potentially more.

    Life is good,
    Maurice

    ... Don't cry for me I have vi.
    --- GNU bash, version 5.0.7(1)-release (aarch64-raspi3b+-linux-gnu)
    * Origin: Little Mikey's CanadARM - Ladysmith BC, Canada (1:153/7001.2989)
  • From Ozz Nixon@1:1/123 to Maurice Kinal on Saturday, April 27, 2019 09:26:53
    On 2019-04-25 21:27:09 +0000, Maurice Kinal -> Ozz Nixon said:


    Dec CP437 CP850 CP855 CP866

    Let me know what you think of the idea and I am sure we could come up with a better map if it matters. Bottom line is that you could come up with a "bottom line" in 8 bit codes that will be the same for the above codepages
    and
    potentially more.

    The challenge is, how common is it for the end user to know their CodePage?

    I am always looking for ways to auto-detect... for example, I send 3 3
    byte UTF codes at the start of my BBSes - send ANSI 6n, if I get 10;1 I
    know NOT UTF, if I get 4;1, I know UTF.

    Right now, 10;1 I assume CP437 output. And 4;1 goes through my CP437 ->
    UTF8 map - built into my socket layer.

    Now yes, the effort you did, has been "absorbed" into my mappings ...
    just wonder if there is a way to detect their Terminal CodePage. I know
    there are a few other ANSI inqueries - terminal, and height/width.
    However, I rely on the TELNET IAC inqueries right now for terminal,
    height and width. (which won't work on Dial-up.. and I have been asked
    to keep Dial-up in the next release).


    --
    .. Ozz Nixon
    ... Author ExchangeBBS (suite)
    .... Since 1983 BBS Developer

    --- ExchangeBBS NNTP Server v3.1/Linux64
    * Origin: (1:1/123)
  • From Maurice Kinal@2:280/464.113 to Ozz Nixon on Saturday, April 27, 2019 14:02:27
    Hallo Ozz!

    The challenge is, how common is it for the end user to know their CodePage?

    I'd say the odds are against you. The safest bet is to stick with 7 bit ascii codes in text messaging, but then where is the fun in that?

    just wonder if there is a way to detect their Terminal CodePage.

    I know that and half-decent telnet clients used to report columns and lines to the mothership it was connecting to. Also I believe web servers such as Apache
    can and will obtain that sort of information from clients using cgi scripts and the such.

    which won't work on Dial-up.. and I have been asked to keep
    Dial-up in the next release

    Understood. I haven't used dialup in at least 20 plus years now. If I am not mistaken my last dialup BBS (DOS Maximus) was in 1996-ish.

    Het leven is goed,
    Maurice

    ... Huil niet om mij, ik heb vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's EuroPoint - Ladysmith BC, Canada (2:280/464.113)