Thread Systematische Fehler (42 answers)
Opened by rosti at 2023-11-12 10:22

barney
 2023-11-14 09:37
#195520 #195520
User since
2008-08-31
132 Artikel
BenutzerIn
[Homepage] [default_avatar]
Quote
Das Encoding der Konsole gilt nämlich nur für die Konsole und legt fest, wie die zu Zeichen gehörigen Bytesequenzen darzustellen sind.


Genau, bzw. ich hätte es andersherum gesagt, wie die Bytesquenzen als Zeichen zu interpretieren und darzustellen sind.

Quote
Was ':encoding(console_out)' macht ist also kein Handshake, Deine Annahme das damit das Terminal befragt wird ist falsch.


Da hast du mich verloren. Das ':encoding(console_out)' befragt das Terminal nicht, da passiert ja schon beim Laden von CPAN:Encode::Locale. Aber ich vermute dass du etwas anderes meinst.
Siehe https://metacpan.org/pod/Encode::Locale#DESCRIPTIO... anders.

Quote
For programs running in a terminal window (called a "Console" on some systems) the "locale" encoding is usually a good choice for what to expect as input and output. Some systems allows us to query the encoding set for the terminal and Encode::Locale will do that if available and make these encodings known under the Encode aliases "console_in" and "console_out". For systems where we can't determine the terminal encoding these will be aliased as the same encoding as "locale". The advice is to use "console_in" for input known to come from the terminal and "console_out" for output to the terminal.


Folgenden Satz verstehe ich überhaupt nicht.

Quote
Ein Terminal erwartet keine Encoding sondern Bytesequenzen.


Was soll das bedeuten? Ein Unicode Codepoint der in einen bestimmten Encoding kodiert ist, ist doch eine Bytesequenz.

View full thread Systematische Fehler