paladin-t / my_basic

A lightweight BASIC interpreter written in standard C in dual files. Aims to be embeddable, extendable and portable.
http://paladin-t.github.io/my_basic/
MIT License
507 stars 118 forks source link

Unicode Printing Issue #82

Open blazer2k1 opened 1 year ago

blazer2k1 commented 1 year ago

Trying out the unicode example in the Wiki, I get this output on Windows 10:


, 5
paladin-t commented 1 year ago

Unicode characters are saved in UTF-16, GBK, etc rather than UTF-8 by many editors on Windows. Try re-saving it in UTF-8, it will work as expected.

image

blazer2k1 commented 1 year ago

I did and using sublimetext, set to utf-8. I assume this would also involve setting the localization and not working directly since it is printing to the console.

paladin-t commented 1 year ago

I will make a full debug when I get back to my win 10 in a few days.

paladin-t commented 1 year ago

Updated, please try again.

blazer2k1 commented 1 year ago

No longer blank, but I get this now on mingw/gcc:

你好世界
πüôπéôπü½πüíπü», 5

and building with Visual Studio I get this:

Untitled

but when I copy and paste it, it does somehow work.