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
range operator does not use locale to create alphabet #9977
Comments
From wanradt@gmail.comCreated by wanradt@gmail.comWhen trying to make a list of alphabet with range operator (..), it In example code i used lc to make sure, that locale information is got #!/usr/bin/perl use strict; print setlocale( LC_CTYPE ), "\n\n";; my @real = qw(R S Š Z); __END__ Perl Info
|
From @rgarcia2009/11/23 WK <perlbug-followup@perl.org>:
I would say, let's not go there : locales are a dying system, and that |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Mon, Nov 23, 2009 at 7:35 AM, Rafael Garcia-Suarez <rgs@consttype.org>wrote:
Is that his point? Or are you saying that locale != language? |
From doom@kzsu.stanford.edurgs@consttype.org wrote:
Any such code (whether or not it's a CPAN module) will need some way to Yes, language should be an attribute of the text, not the user, but the |
From wanradt@gmail.com
I'm sorry, but i hoped to get any feedback to my report. Until todays So, i'd like to ask what to use then instead this "dying system"? For We already have (had?) in Perl support to locales. Why break it? I'd -- WK |
@rgs - Status changed from 'open' to 'rejected' |
From @rgarcia2010/1/17 WK <wanradt@gmail.com>:
You should write code to handle alphabetical ordering respecting the
Locales are broken by design. They were invented at a time where all |
From doom@kzsu.stanford.eduOn Mon Jan 18 05:32:17 2010, rgs@consttype.org wrote:
That's what he's trying to do.
And it would exist for a few more if the handling of locales wasn't so
Locales may very well be a dying system, but they aren't dead yet, |
From @davidnicolOn Sun, Jan 17, 2010 at 9:52 AM, WK <wanradt@gmail.com> wrote:
The following has not been tested in any way: sub ranger(@) { my $EErange = ranger qw { A B C D E F G H I J K L M N O P Q R S Š Z Ž print "$_\n" for $EErange->('S','Z'); |
From doom@kzsu.stanford.eduYes, that looks good... davidnicol@gmail.com wrote:
But how do you know what alphabet to pass in to the routine? The client programmer is now supposed to hack their own version of the |
From wanradt@gmail.com2010/1/18 Rafael Garcia-Suarez <rgs@consttype.org>:
You are porbably right in many aspects, but i'd like to add some bits - as far we don't have better system replacing locale we are freezing without it - latin1 is also broken/hack from todays view, so maybe let's throw - sorting accepts my locale (i mean UTF8 and multibyte chars too), so #!/usr/bin/perl use strict; use utf8; my @a = qw(x y ü ö ä õ ž z š s); # chars are in opposite order print "$_ " foreach sort @a; # comes: s š z ž õ ä ö ü x y { - despite i have just average knowledge of Perl, i avoid every hackish - locale may be broken by architecture, but from point of use it is For my little problem there are certainly workarounds, but those are -- WK |
Migrated from rt.perl.org#70732 (status was 'rejected')
Searchable as RT70732$
The text was updated successfully, but these errors were encountered: