QuoteDas 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.
QuoteWas ':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
Encode::Locale. Aber ich vermute dass du etwas anderes meinst.
Siehe
https://metacpan.org/pod/Encode::Locale#DESCRIPTIO... anders.
QuoteFor 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.
QuoteEin Terminal erwartet keine Encoding sondern Bytesequenzen.
Was soll das bedeuten? Ein Unicode Codepoint der in einen bestimmten Encoding kodiert ist, ist doch eine Bytesequenz.