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
ISO-Latin 1 characters with Linux does not work version 4.02.3-9 for Debian #7740
Comments
Comment author: @xavierleroy You really need to ask for help on discuss.ocaml.org rather than post reports here: that will get you more friendly feedback. Your Debian terminal is using Unicode with UTF-8 encoding, not ISO Latin 1. So, what looks to you like a correct character literal 'é' actually looks to OCaml like '\xc3\xa9', that is, two bytes between the quotes. Check forr yourself: $ cat > foo If you really want to use ISO Latin 1 accented characters, you'll need to configure a console and a text editor to use this encoding instead of Unicode/UTF8. That's nontrivial and a reason why most of us just no longer use accented characters in OCaml sources, except in comments and possibly strings. Oh, by the way: the parentheses in int_of_char ('a') are not needed and considered poor style. |
Comment author: vanto Replying to the administrator. "... that will get you more friendly feedback." You say. "Oh, by the way: the parentheses in int_of_char ('a') are not needed and considered poor style." You say. |
Comment author: @xavierleroy You crossed the line. This is a bug tracking system, not a place to vent your frustrations. That was your last post here. |
Original bug ID: 7740
Reporter: vanto
Status: resolved (set by @xavierleroy on 2018-02-21T14:52:00Z)
Resolution: not a bug
Priority: normal
Severity: minor
Platform: Linux
OS: Debian
OS Version: 9
Version: 4.02.3
Category: compiler driver
Related to: #7737
Bug description
version 4.02.3-9 for Debian
vanto@debian9:~$ ocaml
OCaml version 4.02.3
int_of_char ('a');;
int_of_char (_'é');;;
Warning 3: deprecated: ISO-Latin1 characters in identifiers
Error: Syntax error: operator expected.
this error also occurs with version 4.01.0-5 for Debian.
Steps to reproduce
Type in a terminal (linux) int_of_char ('é');;
then Enter
at this moment a warning and an error message appears, but the line
has changed.
an underscore was added under the first apostrophe and a third
semi-colon appeared after the other two as you can see above. (I
had to add the underscore here because it was not saved in the copy and
paste.But in reality the underscore is well below the first apostrophe)
The text was updated successfully, but these errors were encountered: