Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#6013 closed enhancement (invalid)

A patch to add Finnish and Swedish to libicu-common.so library

Reported by: Karvjorm Owned by: nobody
Priority: normal Milestone: R1
Component: System Version: R1/alpha2
Keywords: libicu-common.so Finnish Swedish locid Cc: Karvjorm
Blocked By: Blocking:
Platform: All

Description

Here is two patch to add Finnish/Finland and Swedish/Sweden to libicu-common.so library. The first one is for header file changes and the second one for .cpp file changes.

Attachments (2)

headers_libs_icu_unicode_locid.patch (762 bytes ) - added by Karvjorm 15 years ago.
A patch to add Finnish and Swedish to libicu-common header file locid.h
libs_icu_source_common.patch (1.0 KB ) - added by Karvjorm 15 years ago.
A patch to add Finnish and Swedish to libicu-common locid.cpp file

Download all attachments as: .zip

Change History (10)

by Karvjorm, 15 years ago

A patch to add Finnish and Swedish to libicu-common header file locid.h

by Karvjorm, 15 years ago

A patch to add Finnish and Swedish to libicu-common locid.cpp file

comment:1 by stippi, 15 years ago

I don't understand why this isn't already part of ICU. Or are these patches to customizations/extensions that were done for Haiku?

comment:2 by Karvjorm, 15 years ago

This Locale class is used by icu_4_2 in Country.cpp file, for examples. When I studied about handling of encoding, I noticed that there was some languages implemented but others were not. So I added those two languages (and Countries) that became first in mind. :)

comment:3 by stippi, 15 years ago

But is this actually needed for the encoding to work correctly? I am asking since we may want to avoid any changes to upstream code unless they are absolutely necessary.

in reply to:  3 comment:4 by Karvjorm, 15 years ago

Replying to stippi:

But is this actually needed for the encoding to work correctly? I am asking since we may want to avoid any changes to upstream code unless they are absolutely necessary.

No, I do not know, why encoding does not work. Not even language and country settings in terminal window. It can be a terminal bug. But there are several localized tools like flex. If you set export LANG=fi_FI@UTF-8 in linux terminal window, and type a command flex --help, you can see everything in Finnish. Even export LANG=fi, or export LANG=fi_FI works in linux environment. But not in Haiku terminal. I do not know if here is implemented a non-localized versions of flex, only. Or is there any other reason why Finnish translations do not work in terminal window. And this missing locid.cpp (patch) Finnish language implementation was one thing that I found when searching for the reason for that.

I'm generally wondering if "const char    fStrings;" strings in Country.h file are defined to save encodings like "UTF-8, euro, ISO-8859-1" etc. But it is unclear for me how they are implemented?

comment:5 by stippi, 15 years ago

Resolution: invalid
Status: newclosed

Thanks for the clarification, I would rather not apply the patch then, since I believe the issues you are mentioning are because Haiku's locale kit simply does not tie up some loose ends. I would recommend discussing this on the haiku-development list, this ticket may have slipped the attention of the developers more directly involved in integrating ICU. (Setting to (probably) invalid, since chances are good that the patches are not needed.)

in reply to:  5 ; comment:6 by anevilyak, 15 years ago

Replying to stippi:

I would recommend discussing this on the haiku-development list, this ticket may have slipped the attention of the developers more directly involved in integrating ICU. (Setting to (probably) invalid, since chances are good that the patches are not needed.)

Actually, I believe Oliver's POSIX Locale developer branch is dedicated specifically to this problem.

in reply to:  5 comment:7 by zooey, 15 years ago

Replying to stippi: [ ... ]

Thanks for the clarification, I would rather not apply the patch then, since I believe the issues you are mentioning are because Haiku's locale kit simply does not tie up some loose ends. I would recommend discussing this on the haiku-development list, this ticket may have slipped the attention of the developers more directly involved in integrating ICU. (Setting to (probably) invalid, since chances are good that the patches are not needed.)

Indeed the patch is not needed - those Locale::getXXX functions are just shortcuts for Locale::getLocale() with a specific locale name. The added functions would never be invoked anywhere, so they do not make sense.

in reply to:  6 comment:8 by zooey, 15 years ago

Replying to anevilyak:

Replying to stippi:

I would recommend discussing this on the haiku-development list, this ticket may have slipped the attention of the developers more directly involved in integrating ICU. (Setting to (probably) invalid, since chances are good that the patches are not needed.)

Actually, I believe Oliver's POSIX Locale developer branch is dedicated specifically to this problem.

That's correct.

Note: See TracTickets for help on using tickets.