Jose Tomas Salvador · Feb 18, 2019

Charset or encoding to access Caché terminal through Powershell


is anyone using Powershell to access Caché terminal in non-english systems?

I'm trying to access using: csession INSTANCE

But from the beginning it fails to represent spanish characters like ñ,...

It doesn't recognize  up-down cursor keys to see previous commands...

Any idea?

1 545
Discussion (6)1
Log in or sign up to continue


CHCP 65001

in the beginning  of your script.

Also you need to check that your console font has required symbols.

Almost worked... I got the right symbol in login, but, once within the terminal special characters are not recognized.

Up and Down keys are still not recognized.

Is that a production instance?

Is that 8bit or Unicode instance?

What I/O tables NLS routine shows? (Note that modifying locales/defaults can be potentially application-breaking change so do it only if you know what you're doing)

zn "%SYS"

do ^NLS
1) Display current locale
2) Select defaults
3) Change locale
4) Display loaded settings
5) Advanced
NLS option? 2
1) Internal tables
2) I/O tables
3) CSP files
4) Date, time and number formats
Category of defaults? 2
Items marked with (*) represent the locale's original default
I/O table              Current default
---------------------  --------------------
1) Process             RAW (*)
2) Cache Terminal      UTF8 (*)
3) Other terminal      UTF8 (*)
4) File                UTF8 (*)
5) Magtape             UTF8 (*)
6) TCP/IP              RAW (*)
7) System call         RAW (*)
8) Printer             CP1251 (*)

OK. We're improving a bit.

I've changed Cache Terminal to CP850 which is the code page that Windows Powershell uses by default:

Now, any idea how could I make up-down keys work so to see the commands' history? Also, as Robert C. also mentioned… it seems that Ctrl-C quits not only from the command/function in execution but from Caché Terminal itself...

I don't think it's possible.

You can spawn cterm from powershell with

ccontrol cterminal ENSEMBLE

interesting observation  with CHPC 65001:

a loop USER>for i=1:1:255 write i," ",$c(i),!   stops the session with any character > $c(127).

I'd suggest forget that M$ crap.
Use Putty or any thing else.

Cache for Windows (x86-64) 2018.1.1 (Build 312U) Thu Jan 3 2019 14:34:00 EST