in reply to Re: Special character not being captured
in thread Special character not being captured
choroba, It confuses me why when I use make_hash, it returns the correct strings as keys and values without having to specify an encoding; but when I go to get the first character with either the first_alpha subroutine or substr, I suddenly need to specify the encoding. All of these subroutines are in the same module where encoding is not specified anywhere. Some subroutines return the correct strings without having to specify encoding while others do not is confusing.
If this helps, I am including my locale.
me@office:~$ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE=C LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
As an aside, I rewrote first_alpha. The original horrified me. I hope the rewrite is cleaner.
Original | Rewrite |
---|---|
|
|
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Special character not being captured
by choroba (Cardinal) on Jun 21, 2019 at 07:15 UTC | |
by Lady_Aleena (Priest) on Jun 23, 2019 at 17:47 UTC | |
by choroba (Cardinal) on Jun 24, 2019 at 07:19 UTC |
In Section
Seekers of Perl Wisdom