Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add console output codepage for windows #967

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

lodinukal
Copy link
Contributor

@lodinukal lodinukal commented Jun 30, 2023

Previously unicode codepoints would be incorrectly shown in windows terminals, such as with u2503(┃):

 "print('\u{2503}')" | luau.exe
Γöâ

This change fixes the issue by setting the console's codepage on windows, resulting in fixed behaviour:

 "print('\u{2503}')" | luau.exe

@vegorov-rbx
Copy link
Collaborator

Thank you for your interest in improving Luau, but unfortunately we are not going to accept this change.

It's up to the host application that embeds Luau to decide how output of a C printf is handled.
While I'm a fan of utf-8 everywhere, it wouldn't be appropriate for a Luau runtime to override the application decisions.

Having said this, Luau REPL (luau.exe) is a host application that embeds Luau, so doing this might be appropriate in Repl.cpp.

@vegorov-rbx
Copy link
Collaborator

vegorov-rbx commented Jul 6, 2023

Another problem is that this change will not allow Luau to be used on Windows Universal App platform.

@lodinukal
Copy link
Contributor Author

Ah alright. If i move this change to Repl.cpp would that be okay?

@vegorov-rbx
Copy link
Collaborator

Ah alright. If i move this change to Repl.cpp would that be okay?

Yes.

@vegorov-rbx vegorov-rbx merged commit c98a9d7 into luau-lang:master Jul 6, 2023
andyfriesen added a commit that referenced this pull request Jul 7, 2023
* Fixed indexing table intersections using `x["prop"]` syntax:
#971
* Add console output codepage for Windows:
#967
* Added `Frontend::parse` for a fast source graph preparation
* luau_load should check GC
* Work toward a type-diff system for nicer error messages

New Solver
* Correctly suppress errors in more cases
* Further improvements to typechecking of function calls and return
statements
* Crash fixes
* Propagate refinements drawn from the condition of a while loop into
the loop body

JIT
* Fix accidental bailout for math.frexp/modf/sign in A64
* Work toward bringing type annotation info in
* Do not propagate Luau IR constants of wrong type into load
instructions
* CHECK_SAFEENV exits to VM on failure
* Implement error handling in A64 reg allocator
* Inline the string.len builtin
* Do not enter native code of a function if arguments don’t match

---------

Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
RomanKhafizianov added a commit to RomanKhafizianov/luau that referenced this pull request Nov 27, 2023
* Fixed indexing table intersections using `x["prop"]` syntax:
luau-lang/luau#971
* Add console output codepage for Windows:
luau-lang/luau#967
* Added `Frontend::parse` for a fast source graph preparation
* luau_load should check GC
* Work toward a type-diff system for nicer error messages

New Solver
* Correctly suppress errors in more cases
* Further improvements to typechecking of function calls and return
statements
* Crash fixes
* Propagate refinements drawn from the condition of a while loop into
the loop body

JIT
* Fix accidental bailout for math.frexp/modf/sign in A64
* Work toward bringing type annotation info in
* Do not propagate Luau IR constants of wrong type into load
instructions
* CHECK_SAFEENV exits to VM on failure
* Implement error handling in A64 reg allocator
* Inline the string.len builtin
* Do not enter native code of a function if arguments don’t match

---------

Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants