Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:32 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Box drawing characters in TeraTerm

     Page 1 of 2    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 08:21pm 15 Feb 2021
Copy link to clipboard 
Print this post

Hi folks,

Does anyone know if/how to configure Tera Term to display the box drawing characters specifically cp437 where they align with the box-drawing characters in the CMM2's fonts.

Thanks,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 09:40pm 15 Feb 2021
Copy link to clipboard 
Print this post

IIRC I was playing with something like that on the Micromite a while ago. I've put together a little VT100 library for it to give a bit of interaction via the console. I got rather waylaid though. As you do. :) At the time I was starting to play with the box characters (they are mapped to a logic all of their own!). Unfortunately I've never used them with a CMM2 as I haven't got one. Now, whether Tera Term was emulating a VT100 or something else I can't remember now. It might have been a VT220. I don't seem to have left any notes in my test routine.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 02:57pm 16 Feb 2021
Copy link to clipboard 
Print this post

Surely one of the grognard's (not a derogative term, not derived from "retard", see https://www.merriam-webster.com/dictionary/grognard) must know ?

I've done some more experimenting and if I send UTF-8 block-drawing codes then a sub-set of them are correctly rendered by TeraTerm (if set to use the UTF-8 Language) but that isn't really terribly convenient, unlike good old CP437.

Best wishes,

Tom
Edited 2021-02-17 00:58 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 03:09pm 16 Feb 2021
Copy link to clipboard 
Print this post

both windows and linux versions of GFXterm use CP437 as much as is possible.


cheers,
rob   :-)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 03:31pm 16 Feb 2021
Copy link to clipboard 
Print this post

  robert.rozee said  both windows and linux versions of GFXterm use CP437 as much as is possible.

cheers,
rob   :-)


Hey Rob,

It took me a while to find it, Google didn't help, and then I vaguely recalled it might be something you had written yourself and posted about on TBS. I tried out this version: http://www.thebackshed.com/docregister/ViewDoc.asp?DocID=22

It does appear to accept the box-drawing codes

Does it have a 100 x 50 mode suitable for the CMM2 ?

It doesn't appear to support the (almost) standard control-code to hide the cursor: Esc[?251

To be honest I'm not sure this is the solution. I thought I was onto something with creating a library that could render a TUI on both the Serial and VGA displays, but if it won't work with TeraTerm unless I translate on the fly to UTF-8 codes then it may not be as usable/portable as I would have liked ... plus I'll probably have to switch to CSUBs to handle the translation as I was already at the limits of acceptable performance.

Thanks,

Tom
Edited 2021-02-17 01:31 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:48pm 16 Feb 2021
Copy link to clipboard 
Print this post

Have you tried changing TeraTerm to use code page 437?
Setting found under 'Terminal"

You will also need to use a font that has the line drawing characters defined.

Jim
VK7JH
MMedit
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 08:52pm 16 Feb 2021
Copy link to clipboard 
Print this post

  TassyJim said  Have you tried changing TeraTerm to use code page 437?
Setting found under 'Terminal"


Which version of TeraTerm ? - no such setting for version 4.105

Regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:59pm 16 Feb 2021
Copy link to clipboard 
Print this post

  thwill said  
  TassyJim said  Have you tried changing TeraTerm to use code page 437?
Setting found under 'Terminal"


Which version of TeraTerm ? - no such setting for version 4.105

Regards,

Tom

4.94
VK7JH
MMedit
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:05pm 16 Feb 2021
Copy link to clipboard 
Print this post

  TassyJim said  
  thwill said  Which version of TeraTerm ? - no such setting for version 4.105

4.94


So an older version ... I've just installed that and still no such setting.

This is weird - can you post a screenshot of the dialog and the about box ?

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:40pm 16 Feb 2021
Copy link to clipboard 
Print this post

I did a few tests.
CP65001 and CP437 both display the same extended ASCII characters so no help for you there.
I use Terminal font. It can be difficult to find fonts that have the line drawing characters.

I suggest that you have some odd setting in your teraterm.ini file. Delete it and start fresh.











Jim
Edited 2021-02-17 07:43 by TassyJim
VK7JH
MMedit
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:57pm 16 Feb 2021
Copy link to clipboard 
Print this post

Thanks Jim.

  Quote  I suggest that you have some odd setting in your teraterm.ini file. Delete it and start fresh.


That doesn't appear to be the case. To display the two "Coding" fields requires a change in Setup->General to use UTF-8 before they are displayed but I'm still to discover what setting needs flicking to show "CodePage".

I independently discovered that the key was using the "Terminal" font, but even that doesn't contain the full Cp437 set of line-drawing characters (it doesn't contain the junctions between double and single line borders).

Anyway I think I've got as good as I'm going to get from TeraTerm now, so thank you for your help.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 10:39pm 16 Feb 2021
Copy link to clipboard 
Print this post

CMM2 Font #1 for installation in Windows:

CMM2f1.zip
Micromites and Maximites! - Beginning Maximite
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 11:49pm 16 Feb 2021
Copy link to clipboard 
Print this post

For me, with Terminal font set in Teraterm, both CP65001 and CP437 have the anomaly of not printing the upper right corner, single or double, or double lower right corner if preceded by the appropriate horizontal line character.

In MMBasic DOS, the code draws the boxes properly.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:16am 17 Feb 2021
Copy link to clipboard 
Print this post

  lizby said  For me, with Terminal font set in Teraterm, both CP65001 and CP437 have the anomaly of not printing the upper right corner, single or double, or double lower right corner if preceded by the appropriate horizontal line character.

In MMBasic DOS, the code draws the boxes properly.


I believe it is happening because you have TeraTerm configured to receive UTF-8 and 0xC4BF just so happens to be a valid UTF-8 character so those two bytes are interpreted as a single character and it happens to be a character not present in the font you are using, so you get a ? When you insert the space you break the byte sequence and hence get the expected characters.

The same doesn't happen for all the horizontals because 0xC4C4 is not a valid UTF-8 character.

Or I might be adding 2 + 2 and getting 5.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 01:23am 17 Feb 2021
Copy link to clipboard 
Print this post

Hummm, maybe. My ignorance is deep here. The only choice I can see for coding other then UTF-8 is something called UTF-8m. Selecting that makes no difference.

Where does 0xC4BF come from? I thought I was sending chr$(191) or 187 or 188.

This may be too deep for me, but I hate it when things nearly work.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:44am 17 Feb 2021
Copy link to clipboard 
Print this post

  Quote  Where does 0xC4BF come from? I thought I was sending chr$(191) or 187 or 188.

That is the HEX equivalent to the decimal numbers.

I don't think that is the problem though.
I remember the corners causing grief many years ago but forget where and what I did about it.

You can get around it by drawing the corners first then backspacing to draw the lines.
Crude but it does work.

PRINT CHR$(218);: FOR i=1 TO 10: PRINT CHR$(196);: NEXT i: PRINT CHR$(191)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(192);: FOR i=1 TO 10: PRINT CHR$(196);: NEXT i: PRINT CHR$(217)
PRINT
PRINT CHR$(201);: FOR i=1 TO 10: PRINT CHR$(205);: NEXT i: PRINT CHR$(187)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(200);: FOR i=1 TO 10: PRINT CHR$(205);: NEXT i: PRINT CHR$(188)

PRINT CHR$(218);: FOR i=1 TO 9: PRINT CHR$(196);: NEXT i: PRINT " "+CHR$(191);CHR$(8);CHR$(8);CHR$(196)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(192);: FOR i=1 TO 10: PRINT CHR$(196);: NEXT i: PRINT CHR$(217)
PRINT
PRINT CHR$(201);: FOR i=1 TO 9: PRINT CHR$(205);: NEXT i: PRINT " "+CHR$(187);CHR$(8);CHR$(8);CHR$(205)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(200);: FOR i=1 TO 9: PRINT CHR$(205);: NEXT i: PRINT " "+CHR$(188);CHR$(8);CHR$(8);CHR$(205)





I see a use for a small macro.

Even simpler, print a space followed by a backspace before printing the corners.

PRINT CHR$(218);: FOR i=1 TO 10: PRINT CHR$(196);: NEXT i: PRINT " ";CHR$(8);CHR$(191)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(179);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(179)
PRINT CHR$(192);: FOR i=1 TO 10: PRINT CHR$(196);: NEXT i: PRINT CHR$(217)
PRINT
PRINT CHR$(201);: FOR i=1 TO 10: PRINT CHR$(205);: NEXT i: PRINT " ";CHR$(8); CHR$(187)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(186);: FOR i=1 TO 10: PRINT " ";: NEXT i: PRINT CHR$(186)
PRINT CHR$(200);: FOR i=1 TO 10: PRINT CHR$(205);: NEXT i: PRINT " ";CHR$(8); CHR$(188)


Jim
Edited 2021-02-17 16:50 by TassyJim
VK7JH
MMedit
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:47am 17 Feb 2021
Copy link to clipboard 
Print this post

  TassyJim said  I don't think that is the problem though.


In TeraTerm:

1. Go to [Setup->General...]
2. Change "Language" from "UTF-8" to "English"
3. Re run program
4. Question marks go away and boxes are displayed correctly
5. Think, "Huh, I guess Tom's theory may have been correct, what are the chances of that happening?"

Or it may just be coincidence

Have a nice day.

Best wishes,

Tom
Edited 2021-02-17 20:02 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:05am 17 Feb 2021
Copy link to clipboard 
Print this post

  CircuitGizmos said  CMM2 Font #1 for installation in Windows:

CMM2f1.zip


Many thanks, that does nicely.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:29pm 17 Feb 2021
Copy link to clipboard 
Print this post

  TassyJim said  
  Quote  Where does 0xC4BF come from? I thought I was sending chr$(191) or 187 or 188.

That is the HEX equivalent to the decimal numbers.

I understand that 191=0xBF, but where does the C4 come from?

Thanks, Jim, for the workaround.

  thwill said  In TeraTerm:

1. Go to [Setup->General...]
2. Change "Language" from "UTF-8" to "English"

Who knew that UTF-8 was a language? Thanks.

(BTW, UTF-8 -> English worked.)
Edited 2021-02-17 22:49 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 01:57pm 17 Feb 2021
Copy link to clipboard 
Print this post

  lizby said  
  TassyJim said  
  Quote  Where does 0xC4BF come from? I thought I was sending chr$(191) or 187 or 188.

That is the HEX equivalent to the decimal numbers.

I understand that 191=0xBF, but where does the C4 come from?


C4 is 196 which you are expecting to be the single horizontal line box-drawing character.

What follows is educated conjecture there may be another explanation for the facts:

Since your terminal was set to handle UTF-8 the two bytes:

       Chr$(196) + Chr$(191)

are interpreted as the single UTF-8 character U+013F (Latin capital letter L with middle dot), don't ask me how the conversion works

Because two bytes are converted to one character the resulting line is short by one character, and because the font you are using doesn't contain that character it is rendered as "?"

When you change the "Language" to something other than UTF-8 I would conject that TeraTerm interprets individual byte values as the first 256 characters of language specific fonts ... though it may be more involved than that.

Best wishes,

Tom
Edited 2021-02-17 23:59 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025