in reply to Re^2: Memory Leak with XS but not pure C
in thread Memory Leak with XS but not pure C
If you were feeding the 'uc' operator a string of utf8 bytes from your editor which perl had not been informed was intended as unicode, then perl would apply ascii uppercasing rules to that string of bytes. Now that you have the "use utf8" in your file, I think you'll find that 'uc' works properly on that string. But, you'll also find that perl warns you if you try to print that string, because in the default configuration the output streams expect bytes as input. You can either use binmode(STDOUT, 'encoding(UTF-8)') to declare that you intend to always write unicode to the file handle, or remember to encode the string before printing.
Full unicode support exists in perl, but yeah it's kind of a learning curve to find it :-( But that's the price we pay for full multi-decade back-compat.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Memory Leak with XS but not pure C
by FrankFooty (Novice) on Mar 30, 2025 at 07:31 UTC | |
by NERDVANA (Priest) on Mar 31, 2025 at 16:49 UTC | |
by FrankFooty (Novice) on Apr 01, 2025 at 12:59 UTC |