Hi,
edit: apologies but the utf8 characters are not displaying properly in code. Each string is ϗblah頁.
I am having an issue in understanding what is happening between the two code snippets below. The first example generates a wide character error as expected since I haven't set STDOUT's encoding to utf8. However, in the second example, although I have pointed STDERR at STDOUT, no such error is generated on warn and it successfully prints out the utf8 characters. What exactly is happening here?
example 1
use strict; use warnings FATAL => qw#all#; use utf8; #print qq#content-type: text/plain; charset=UTF-8\n\n#; print q#print: ϗblah頁#; # wide char error.
example 2
use strict; use warnings FATAL => qw#all#; use utf8; *STDERR = *STDOUT; #print qq#content-type: text/plain; charset=UTF-8\n\n#; warn q#warn: ϗblah頁#; # no error. print q#print: ϗblah頁#; # wide char error still.
Thanks,
Peter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |