New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locale, utf8 and string functions #9974
Comments
From wanradt@gmail.comCreated by wanradt@gmail.comSynopsis: perl does not use locale information in string functions. Example: use locale; Expected output: ABCÕÄÖÜŠŽ Improved example which shows that perl is getting/setting locale, but --- use POSIX qw(locale_h); print setlocale(LC_CTYPE), "\n"; print setlocale(LC_CTYPE, "et_EE.UTF-8"), "\n"; print setlocale(LC_CTYPE, "en_GB.UTF-8"), "\n"; Output: So, no uppercase for non-ASCII chars. Of course, it is common to all Conclusion: something is wrong here, for me it seems like a bug. Remark: i marked severity 'medium', but for me is this and other Perl Info
|
From @rgarcia2009/11/20 WK <perlbug-followup@perl.org>:
Works here : Either your strings aren't encoded in utf8, or your locale is buggy.
I personally think that locales are a pain to work with. I also fail |
The RT System itself - Status changed from 'new' to 'open' |
From @ap* WK <perlbug-followup@perl.org> [2009-11-23 13:10]:
Correct synopsis: you forgot to put `use utf8` in your code so
Yes, but not in Perl.
Then fix it. :-) Regards, |
From doom@kzsu.stanford.eduYes, I can get the second code example to work with the use utf8; But why is it necessary to explicitly state "use utf8"? LANG=et_EE.UTF-8 And why should it make any difference if the string is in utf8 I quote from perllocale: The use locale pragma · Regular expressions and case-modification functions (uc(), lc(), Circa perl 5.8, a "use locale" was all it took to get "uc" and Why the change? |
From doom@kzsu.stanford.eduThis does what I would've thought that "use locale" should do (but I |
From @doyAristotle is correct here, this is not a bug. The "it seemed to work -doy |
From [Unknown Contact. See original ticket]Aristotle is correct here, this is not a bug. The "it seemed to work -doy |
@doy - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#70688 (status was 'resolved')
Searchable as RT70688$
The text was updated successfully, but these errors were encountered: