Output on TTY with
- ENCODING set
- binmode set
(TT expects utf8 for input and produces uft8 output)
$ perl tt.pl
Var = abcdef
6 # prints 6
fööbä # prints "fööbä"
fööb # prints "fööb"
==================================
Output with
- ENCODING set
- binmode NOT set
(TT reads UTF8 properly, calculates correctly, but produces iso-8859-1 for output)
$ perl tt.pl
Var = abcdef
6 # prints 6
f??b? # prints "f??b?"
f??b # prints "f??b"
==================================
Output with
- ENCODING NOT set
- binmode NOT set
(TT expects iso-8859-1, gets UTF8 and uses it without conversation, calculations are incorrect due to false expectations of TT, TT outputs as ISO-8859-1 without conversation thus printing the UTF8 chars correctly "by accident")
$ perl tt.pl
Var = abcdef
9 # prints 6
föö # prints "fööbä"
fö? # prints "fööb"