in reply to Re^4: utf8, locale and regexp
in thread utf8, locale and regexp
I tried unsuccessfully the following:use open ":utf8"; binmode(STDIN,":utf8"); binmode(STDOUT, ":utf8");
Well, that's another problem. Maybe you should start a new thread instead of leaving it buried this deep in this thread?
I suspect that the "automatic" string upgrade when concatenation occurs which is enabled with use encoding 'utf8' is mandatory for utf8 templates to work (haven't checked its code though).
"which is enabled with use encoding 'utf8'" is untrue. use encoding has nothing to do with it.
use Encode qw( is_utf8 ); my $s1 = "abc"; my $s2 = chr(0x2660); my $s = $s1 . $s2; print("s1: ", is_utf8($s1)?1:0, "\n"); # 0 print("s2: ", is_utf8($s2)?1:0, "\n"); # 1 print("s: ", is_utf8($s )?1:0, "\n"); # 1
additionnaly I need use locale; in order to use my locale collation.
I only removed it because it was irrelevant to the question I was addressing. Feel free to re-add it.
|
|---|