in reply to Re: UTF-8 strings and the bytes pragma
in thread UTF-8 strings and the bytes pragma
In my opinion, this may lead to some inconsistencies.
For example, when:
my $s1 = "𝔘𝔫𝔦𝔠𝔬𝔡𝔢";
my $s2 = "\x{1D518}\x{1D52B}\x{1D526}\x{1D520}\x{1D52C}\x{1D521}\x{1D522}";
the bytes are the same:
240 157 148 152 240 157 148 171 240 157 148 166 240 157 148 160 240 157 148 172 240 157 148 161 240 157 148 162 240 157 148 152 240 157 148 171 240 157 148 166 240 157 148 160 240 157 148 172 240 157 148 161 240 157 148 162
I think it would be nice to have an way that automatically converts literal strings with hex escapes like "\x{...}" into UTF-8 strings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: UTF-8 strings and the bytes pragma
by Anonymous Monk on Jun 19, 2015 at 17:54 UTC |