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

Fix Unicode characters being entered via console #13054

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Apr 27, 2022

Fixes #7733

I finally looked into this long standing regression.

This change between F# 4.5 and F# 4.7 was incorrect - fixNonUnicodeSystemConsoleReadKey is considered false in the change, but it appears someone falsely read !a as not a. A good example of why it was good to deprecate !expr in F# 6.0

I don't actually know how to test console key input within our automated testing, I'm not totally sure it can be done. None of console.fs is under automated test AFAIK. If anyone has good ideas we could add testing.

@dsyme
Copy link
Contributor Author

dsyme commented Apr 27, 2022

@KevinRansom FYI - regression was in #6311 in March 2019

@dsyme
Copy link
Contributor Author

dsyme commented Apr 27, 2022

This is ready.

@vzarytovskii
Copy link
Member

lgtm
image

@vzarytovskii vzarytovskii merged commit 5cf88af into dotnet:main Apr 27, 2022
@ScottHutchinson
Copy link
Contributor

ScottHutchinson commented Jun 14, 2022

@vzarytovskii
So, I guess this merge fixed the bug in some release of F# 6, but not F#5, which is what we're using in VS 2019?

Our script seems to work correctly when I debug it in VS 2019 (Microsoft (R) F# Interactive version 11.4.2.0 for F# 5.0).

But when I run it from a .cmd file by calling dotnet fsi, then it outputs the wrong characters.

When I replace dotnet fsi in the .cmd file with "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsi.exe", then it works correctly.

Our issue involves File.ReadAllText and/or File.WriteAllText, so maybe it's not the same bug that this merge fixed.

charlesroddie pushed a commit to charlesroddie/fsharp that referenced this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typing / sending unicode characters in FSI is broken
3 participants