-
Notifications
You must be signed in to change notification settings - Fork 320
Can't type Unicode between U+0080 and U+00FF in F# Interactive on Linux and OS X #654
Comments
FYI bug also happens in Ubuntu16.04LTS, just tested. |
I believe what is happening is that the There are compilation flags set to skip building this function on non-Windows systems, but it appears that the Debian package was built from an older version of the code where those compilation flags had not yet been added. So this may in fact be a bug in the Debian (and Ubuntu) packaging, and not a bug in F# Interactive after all. Once I've verified that this bug does not require any changes in F#, I'll open a bug in the appropriate Debian bugtracker and close this GitHib issue. |
Debian bug report opened at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850911. |
Why is this bug closed? |
@ismail @rmunn I was under the impression it was a Debian bug, and that this issue should have been closed?
|
For me I can reproduce this on openSUSE and we do not modify fsharp in any way. |
@ismail OK, reopened, thanks for checking |
Yes, I should have posted a followup comment: I do think that some changes will be needed in F#'s terminal handling. I didn't post anything because I don't yet know what they are. Thinking about it a bit more, it might be best to check the input encoding and, if it's set to UTF-8, skip the |
Also note that #594 is a reproduction on OS X, so this affects more than just Linux. I'll edit the issue title accordingly. |
May be causing this issue of mine: http://forum.pdfsharp.net/viewtopic.php?f=2&t=3553&p=10681#p10681 I must have spent 2 days on this not realising that it's may be the F# interactive that breaks my invoicing. |
@haf could you check this is fixed by tag 4.1.5 please? thanks |
How do I test it? |
@rmunn could you check this is fixed by tag 4.1.5 please? thanks |
@dsyme Confirmed fixed on openSUSE, thanks! |
@ismail lovely, thank you! |
@dsyme And I can confirm that tag 4.1.5 fixes the bug on Linux Mint 18 (which is based on Ubuntu 16.04). I still can't build the visualfsharp repo for the reasons I mentioned in dotnet/fsharp#2582 (comment), but I've been able to build this repo and the fix is working here. |
Further confirmation: I just installed the latest |
Linux Mint 18 (based on Ubuntu 16.04 LTS), F# 4.0. Unicode characters between U+0080 and U+00FF seem to be getting replaced by � (U+FFFD REPLACEMENT CHARACTER) at the F# Interactive prompt. I can include these characters in
.fsx
scripts (encoded in UTF-8) and run them just fine, but when I try to type (or copy & paste) the same characters at the F# Interactive prompt, I get � instead:One line is highlighted in that screenshot because that's what I copied and pasted into the F# Interactive window -- but as you can see, the µ was replaced by �. Same thing occurred when I typed µ at the keyboard. However, using
#load
to load and run the.fsx
file printed the correct output, so this problem is limited to the F# Interactive window.I first encountered this behavior in ionide/ionide-vscode-fsharp#290, but since I'm able to reproduce it entirely in the F# Interactive terminal with no IDE running at all, I believe the root cause of that bug is something in
fsi.exe
and not in the Ionide plugin.Note that this bug does NOT appear to happen on Windows 10 or Mac OS X (I don't know which version of OS X, I just know that in the ionide/ionide-vscode-fsharp#290 bug comments, someone reported that he could not reproduce the bug on OS X). Both people who have reproduced this bug seem to be running Linux.
Expected behavior
The µ character would show up correctly when typed into the terminal.
Actual behavior
All Unicode characters between U+0080 (unassigned control character) and U+00FF (LATIN SMALL LETTER Y WITH DIAERESIS) appear to be replaced by � (U+FFFD REPLACEMENT CHARACTER) when typed at the F# Interactive prompt. Other characters work fine:
Again, the text in F# Interactive was a direct copy-and-paste from the text typed into the Bash shell.
Known workarounds
No workarounds known at the moment. This is interfering with being able to use the Ionide plugin's Alt+Enter shortcut to send text to the F# Interactive window in VS Code.
Related information
Reproduced on Linux Mint 18 (based on Ubuntu 16.04) and on Ubuntu 14.04. In both cases, the
fsharp
package was the latest available from the Mono distribution's official Debian/Ubuntu repo. Terminal used was GNOME terminal, and value of$LANG
variable wasen_US.UTF-8
.The text was updated successfully, but these errors were encountered: