Problem with CP 65001 (UTF-8) in TextWindow

Drago Galić 1 Reputation point
2022-07-27T11:39:44.567+00:00

Hi,
I am trying to convert one my very old BASIC programs from 80's into Small Basic, and am having problem with EE characters in TextWindow. Seems that for some reason it wouldn't show EE characters even though system settings are set to CP 65001 and PowerShell and Command Prompt are set to CP 65001 and I should be able to se EE characters (čćžšđ etc).
I know that there is a GraphicsWindow that let me select specific font and show CP 65001, but I need text window for output.
On some screenshots from Small Basic I saw that sometimes users can get EE characters in TextWindow, but for some reason I cannot.
Could anyone help me with that?

I know how to get EE characters in GraphicsWindows, I am asking about TextWindow, to be clear.

Thanks

Small BASIC
Small BASIC
A programming language created by Microsoft that serves a stepping stone for beginners from block-based coding languages to more complex text-based languages.
277 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Nonki Takahashi 676 Reputation points
    2022-08-13T02:14:38.947+00:00

    Hi @Drago Galić , I did not test yet but LDTextWindow.Encoding("UTF8") may help you. Thanks.

    1 person found this answer helpful.
    0 comments No comments

  2. JR 126 Reputation points
    2022-08-13T16:11:57.72+00:00

    Using Nonki's suggestion and modifying my code snippet all of the accent characters will now show when the program is ran.

    TextWindow.Show()
    LDTextWindow.encoding="utf8"
    TextWindow.WriteLine("")
    TextWindow.WriteLine("èéêëÈÉÊËË")

    JR

    0 comments No comments

  3. Scout 136 Reputation points
    2022-08-13T20:02:07.077+00:00

    It runs for me without any additional settings and when I use LDTextWindow.encoding, then with "Unicode".

    230992-image.png

    0 comments No comments