You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/11/15 07:55:58 UTC

[Bug 63927] New: Inconsistent mapping of Norwegian locales for date formats

https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

            Bug ID: 63927
           Summary: Inconsistent mapping of Norwegian locales for date
                    formats
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: demurcia@ockham-solutions.fr
  Target Milestone: ---

In class org.apache.poi.ss.util.DateFormatConverter, the locale mapping is
defined as:
result.put( "nn", "[$-0814]" ); 
result.put( "no", "[$-0414]" ); 
result.put( "no_no", "[$-0814]" ); 

I suppose that 0414 is Bokmål and 0814 is Nynorsk. If I am correct, a Norwegian
user uses Nynorsk if located in Norway and Bokmål if located elsewhere. 

Should all locales starting with the "no" prefix be mapped to Bokmål ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63927] Inconsistent mapping of Norwegian locales for date formats

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63927] Inconsistent mapping of Norwegian locales for date formats

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

--- Comment #4 from Andreas Beeker <ki...@apache.org> ---
I've provided a reworked mapping of the LCIDs via r1871066.

The mapping is based on the [MS-LCID] specs.

Please verify, if this is ok for you.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63927] Inconsistent mapping of Norwegian locales for date formats

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

Andreas Beeker <ki...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
So according https://www.science.co.il/language/Locale-codes.php, the
assumption about the mapping seems correct.

What puzzles me is, that ISO 639-1 language code for Bokmål is "nb", which is
not in the list.

And according
https://www.oracle.com/technetwork/java/javase/java8locales-2095355.html, this
should be "nb-NO". Also have look at the notes.

So I would ignore the no-NO-x-lvariant-NY variant and change it to the
following:
"no","no_no","nb","nb_no" -> 0414
"nn","nn_no" -> 0814

Correct?

As a side note, we are using a hashmap here ... and add/overwrite multiple
entries with the same key - this is anyway wrong :(

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63927] Inconsistent mapping of Norwegian locales for date formats

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

--- Comment #3 from Andreas Beeker <ki...@apache.org> ---
... and the offical MS spec is [MS_LCID]:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63927] Inconsistent mapping of Norwegian locales for date formats

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63927

--- Comment #2 from Andreas Beeker <ki...@apache.org> ---
I found a better reference for the locale -> windows code translation:
https://ss64.com/locale.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org