Open yegor256 opened 3 days ago
@deemp please, help
@yegor256, run export LC_ALL=C.UTF-8
before running this command.
@deemp yes, we know the workaround, but please make the output escaped :)
@yegor256,
export ...
? export ...
? If it doesn't, then export ...
is not a workaround, but a necessity. We can write it explicitly on command pages on the docs site.@deemp yes, it works with the export
, but I kindly ask you to implement this escaping feature because it will help users debug much faster
@yegor256, can you suggest how to distinguish when to print Unicode and when to escape?
I thought about:
LANG
environment variable, but the locale may be set in other ways on different platforms.--use-unicode-code-points
that would always output unicode.@deemp just escape always, when you print this error message. Why not to escape? It's an error message, it won't be parsed by any software, it will always be read by humans. Replace all 0x7f+
symbols with their mnemos, that's it.
@yegor256, it's inconvenient to read numbers when you can read Unicode characters. If the locale is set correctly, users may prefer to see Unicode.
@deemp I'm the primary user of this app :) I'm telling you, as a user, that error messages must be as non-ambiguous as possible. Unicode is more ambiguous than ASCII.
I'm the primary user of this app
@yegor256, OK, I'll keep that in mind :) Let's escape.
@yegor256, here are representations of errors.
With escaping:
syntax error at line 1, column 1 before `\961'
on input
\961 \8614 \10214 t \8614 \958.\961.k.\961.t
With correctly set locale and without escaping:
syntax error at line 1, column 1 before `ρ'
on input
ρ ↦ ⟦ t ↦ ξ.ρ.k.ρ.t
Do you really prefer the option with escaping?
@deemp can you do both? show the original one and then print the escaped one?
the original one
@yegor256, which one do you mean?
@deemp how many do you have? :) print them both
@deemp please, print both outputs in case of error: 1) not escaped, and 2) escaped
I see this in the log:
Here, I don't understand whether the problem is with the encoding or the input was indeed formatted as
?0
instead ofα0
. I suggest you to "escape" non-ASCII symbols in the output. Instead of printing UTF-8 as is, convert them to something like\u045e
.Maybe you can say
on input (non-ASCII symbols escaped)
instead of juston input
.