marcIhm / yabasic

Yabasic - A simple Basic interpreter for Unix and Windows
http://www.yabasic.de
MIT License
90 stars 17 forks source link

Yabasic supports UTF-8 in Windows 10? #60

Closed Shekhetov closed 9 months ago

Shekhetov commented 9 months ago

Hello All!

Does Yabasic support UTF-8? I tried to create a file utf8.yab and when running the program the Russian font is not displayed correctly 🙁

DOC file created in Notepad++ and saved in the format UTF-8 without BOM
print "Hello World!!! - it works"
print "Привет Мир!!! - this does not work"
end

screen-1 screen-2 screen-3

Everything works fine in Linux

Regars, Anton Shekhetov

marcIhm commented 9 months ago

Well unfortunately not. The string-processing in yabasic is strictly old-school and not capable of doing utf-8. Every char needs to be represented by a single byte and it often depends on the environment, e.g. $LANG on Linux.

Making yabasic work with UTF-8 would be a daunting task, which I do not see within the next few years ...

marcIhm commented 9 months ago

Hi Anton, (sorry for my late reply; I do a deep dive into my mailbox not too often ...)

well unfortunately not. The string-processing in yabasic is strictly old-school and not capable of doing utf-8. Every char needs to be represented by a single byte and it often depends on the environment, e.g. $LANG on Linux.

Making yabasic work with UTF-8 would be a daunting task, which I do not see within the next few years ...

I also post this answer to github, so that others may see it too ...

Regards Marc


Von: Shekhetov @.> Gesendet: Sonntag, 18. Februar 2024 11:51 An: marcIhm/yabasic @.> Cc: Subscribed @.***> Betreff: [marcIhm/yabasic] Yabasic supports UTF-8 in Windows 10? (Issue #60)

Hello All!

Does Yabasic support UTF-8? I tried to create a file utf8.yab and when running the program the Russian font is not displayed correctly 🙁

DOC file created in Notepad++ and saved in the format UTF-8 without BOM print "Hello World!!! - it works" print "Привет Мир!!! - this does not work" end

screen-3.jpg (view on web)https://github.com/marcIhm/yabasic/assets/48033113/71d9b4b9-183e-4493-8602-cba42405460b screen-2.jpg (view on web)https://github.com/marcIhm/yabasic/assets/48033113/a271de02-f741-4028-9be7-dc1ce0c63999 screen-1.jpg (view on web)https://github.com/marcIhm/yabasic/assets/48033113/f1ef77a4-d1ce-4123-8e14-e7578cc328fa

Everything works fine in Linux

Regars, Anton Shekhetov

— Reply to this email directly, view it on GitHubhttps://github.com/marcIhm/yabasic/issues/60, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC5EZHWCRXD4XZW5VZ6K2O3YUHMLTAVCNFSM6AAAAABDOB6RVCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DAOJSGE4TOMI. You are receiving this because you are subscribed to this thread.