Reading codepage 866 (Cyrillic, Russian)

26 views
Skip to first unread message

Eric Pement

unread,
May 2, 2026, 5:13:07 PM (13 days ago) May 2
to SemWare TSE Pro text editor
I want to use TSE to edit a file in Russian text, with Cyrillic characters. When I start a DOS session in Windows 10 and do "chcp 866", this changes the codepage to 866 (Russian/Cyrillic).

When I run the command "e32 myfile.txt", TSE =correctly= displays the characters.

When I run the command "g32 myfile.txt", TSE brings up the wrong character set, and the display is munged.

How can I get "g32" to choose the correct character set or file encoding?

Kind regards,
Eric

Carlo Hogeveen

unread,
May 3, 2026, 2:52:26 AM (13 days ago) May 3
to sem...@googlegroups.com

For a long explanation about TSE and code pages see:
https://ecarlo.nl/tse/files/CodePages.html

In short and simplified, g32.exe itself only supports code page 437 for font Terminal and code page 1252 for all other fonts, e.g. its default font Courier New.
There currently is no way to make g32.exe itself display other code pages.

I have been thinking about an extension that can recognize code pages and can convert them to a Unicode code page, which g32.exe with my UniView extension can display, but there has not been an urgent enough need or a request for that yet.

In other words, you currently have a use case in which e32.exe shines and for which e32.exe is the solution.

Carlo




Carlo Hogeveen

unread,
May 3, 2026, 6:31:26 AM (12 days ago) May 3
to sem...@googlegroups.com

Hmm, after some pondering, it should be easy to write an extension that display-wise makes g32.exe ignore its current 1-byte character encoding and display it as another 1-byte character encoding.
Easy as in that I see no technical obstacles. It will still take a bit of time.
It would support all 1-byte code pages that Windows supports.
I will have a go at it. That should be a generally useful extension, that I would also like to have.
I will not implement automatic recognition of single-byte code pages, which would be at best be hard and some/lots of times be impossible.
Instead I will implement an easy to access "display as code page" switch, which will have to be set per TSE buffer or file.
Yummy, :-)

Carlo



Claus Futtrup

unread,
May 3, 2026, 12:49:38 PM (12 days ago) May 3
to sem...@googlegroups.com
Hallo Carlo

>I will implement an easy to access "display as code page" switch

Sounds good.

Cheers,
Claus

Eric Pement

unread,
May 3, 2026, 8:57:34 PM (12 days ago) May 3
to SemWare TSE Pro text editor
Thank you, Carlo, for your excellent answer. I have the information that I need.  I will continue to use "e32" for editing these pages in Cyrillic, as editing in "g32" is not essential. 

Your page at https://ecarlo.nl/tse/files/CodePages.html was very helpful.

Eric

Carlo Hogeveen

unread,
May 4, 2026, 2:00:25 AM (12 days ago) May 4
to sem...@googlegroups.com
Eric,
Good to hear. Excellent choice, sir.
I will continue with my new extension as a g32 option for my own and general use.
Carlo



S.E. Mitchell

unread,
May 4, 2026, 5:52:25 AM (11 days ago) May 4
to sem...@googlegroups.com
You could try using SetFont() passing the undocumented parameter, the
font_charset:
SetFont("Consolas", 9, 0, 204)
Where 204 is for RUSSIAN_CHARSET
If that doesn't do anything, you could try passing flags as _FONT_OEM_

Alternatively, and not really recommended:
Control Panel => Region
Administrative tab
“Change system locale…”
Choose Russian (Russia)
Reboot

This will impact all apps, so be _very_ careful.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/semware/2096553c-cfe9-4664-8a70-672e43b85086n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages