lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I believe some of those languages are using other encodings in their source code, which I am not suggesting but I am aware that in some cases it's just coincidence. I also do not believe that it is a windows problem, the reason that lua works this way on *nix is because it's outputting the same encoding, if the encoding expected by those systems changed would it not be same situation? I just found something about setting the active code page in an application manifest, but I have no idea what that means to be honest.

On Wed, Jan 13, 2021 at 2:04 PM Scott Morgan <blumf@blueyonder.co.uk> wrote:
On 13/01/2021 13:00, Marcus Mason wrote:
> Perhaps I should clarify my intent here. I want lua to print correctly
> on windows, like all the other programming language binaries I use on my
> computer. Chez scheme, various _javascript_ envrionments, clojure, etc
> have no issues printing for me. Why is lua.exe not able to do it?

On Windows: Python doesn't[1], and Perl doesn't (don't use Clojure or
_javascript_)

You need to stop and do some reading.

Ultimately, it a problem with Windows, not Lua. *nix systems properly
support UTF8 on the console, Windows doesn't.


[1] Trying the following:

print(u"Greek: 'Ναί', Japanese: '番号'")

Outputs something that looks like:

Greek: 'Ναί', Japanese: '□□'

But you can copy/paste that into an editor and see the correct text,
it's just the console messing up rendering.