in reply to Re: Date::Manip and German months names
in thread Date::Manip and German months names
I searched the date::manip source for [a-z] and found a lot of hits.
Good point. I did some more digging myself, and it appears to be a bug in Date::Manip. There is some replacement magic going on to allow the use of "m" in place of "Monat"...
# Check for some special types of dates (next, prev) foreach $from (keys %{ $Lang{$L}{"Repl"} }) { $to=$Lang{$L}{"Repl"}{$from}; s/(^|[^a-z])$from($|[^a-z])/$1$to$2/i; }
As you correctly observed, this is (one place) using the charset [^a-z] to delimit tokens. The net effect of this is that "Mär" ends up as "Monatär" at this stage, which then cannot be parsed properly any further...
Substituting [^a-z\xe4] (for testing purposes) fixes the issue with "Mär", but a proper solution would of course have to dynamically construct the correct character set depending on the language being selected...
I'll submit a bug report. (Update: done)
For the moment, I can live with just disabling that curious "m" => "Monat" mapping feature as follows — in _Date_Init_German():
... #$$d{"replace"} =["m","Monat"]; $$d{"replace"} =[];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Date::Manip and German months names (solved)
by ikegami (Patriarch) on Jul 09, 2008 at 22:20 UTC | |
by almut (Canon) on Jul 09, 2008 at 23:22 UTC | |
by ikegami (Patriarch) on Jul 10, 2008 at 00:15 UTC | |
by almut (Canon) on Jul 10, 2008 at 00:54 UTC | |
by ikegami (Patriarch) on Jul 10, 2008 at 01:38 UTC |