Subject: | docs adjustment related to unicode |
Problem with the following paragraph:
Show quoted text
> The latter cannot store everything but uses less space in general (and
> some buggy Perl or C code might even rely on that internal representation being used).
Internal representation of Latin-1 strings is important when we deal with filenames.
Below is an example (prints "file not found No such file or directory at"), when
downgraded string is same as upgraded, but points to different files.
So, I think 99% of code which opens file, without trying to convert filename into bytes, and
will be affected by string downgrades.
use strict;
use warnings;
use utf8;
my ($u, undef) = split / / , "\x{b5} \x{442}\x{435}\x{441}\x{442}";
my $d = $u;
utf8::downgrade($u);
die unless $u eq $d;
open my $f, ">", "$u.tmp";
print $f "TEST";
close $f;
open $f, "<", "$d.tmp" or die "file not found $!";