Questions tagged [icu4j]

ICU - International Components for Unicode

This extends Java's Unicode and internationalization support, focusing on improving performance, keeping current with the Unicode standard, and providing richer APIs, while remaining as compatible as possible with the original Java text and internationalization API design.

49 questions
1
vote
1 answer

icu4j returns currency code instead of symbol

Background I have an Android application where I want to format an integer value as a currency string depending on the ISO code and current locale. I'm using ICU library 1.8.1 for that. For example, if I have a value 75 and the ISO code is "USD", I…
Gennadii Saprykin
  • 4,505
  • 8
  • 31
  • 41
1
vote
1 answer

java.lang.NoClassDefFoundError: during deployment on web sphere WAS 8.5

I am getting java.lang.NoClassDefFoundError error during my deployment on WAS 8.5.I have included the icu4j jar but still I am getting below error .I have put the jar in lib folder.Could you please advise. [2/4/16 15:41:49:952 GMT] 00000054 webapp …
Aman Mishra
  • 11
  • 1
  • 5
1
vote
0 answers

Is there any API in icu::BreakIterator class that gives the token offsets in number of "bytes"?

#include int main( void ) { const char* iInput; scanf("Enter the input string: %s", &iInput); BreakIterator* boundary->setText(iInput); int32_t iStartOffset = boundary->first(); int32_t iEndOffset =…
0
votes
0 answers

Can ICU4J return multiple alternative transliterations?

For example I want to hand ICU4J a string containing أسامة, which is the name "Osama" as written in Arabic, and I want it to give me back a list of possible transliterations to Latin, for example ["Osama", "Ushamma", "Asama"] Is this possible with…
GregT
  • 1,300
  • 3
  • 16
  • 25
0
votes
0 answers

How can I update the timezone tables in ICU4J JAR?

I've been periodically using the ICUTZU tool, which is a tool to update the timezone tables in ICU4J. The tool is supposed to find the latest version of the timezone database online. Unfortunately, that doesn't seem to be working anymore. The…
jblye
  • 363
  • 1
  • 7
0
votes
0 answers

How to write a collation rule for custom sorting?

I want following rules to applied while sorting The upper case should come after the lower case for the same alphabet, for example, i. mike ii. Milo Punctuation in the beginning of the string should be ignored and string should be sorted with…
0
votes
1 answer

How to do collation sorting with lowercase first?

Input For the given list of below strings, Senthil Anbu arthi Sugumar suresh venila Expected I want the sorting order to be arthi Anbu suresh Senthil Sugumar venila Actual But getting the follow order Anbu arthi Senthil Sugumar suresh venila I…
0
votes
1 answer

Incorrect translations when implementing pluralization in ICU message format. I'm using react-intl (format.js)

It seems like using pluralization in ICU message format is not dependable when combined with static text. Take the following example: Please see the {itemCount, plural, one {message} other {messages} } in your inbox. In Spanish, the word "the"…
dcporter7
  • 535
  • 3
  • 14
0
votes
0 answers

ICU RuleBasedNumberFormat spellout trailing zero issue

There is a problem with number spellout in russian language. Trailing zeros in decimal number are ignored in final result. Here is what I mean: ` RuleBasedNumberFormat nf = new RuleBasedNumberFormat(Locale.forLanguageTag("ru"),…
0
votes
0 answers

Wrong date format in docker container, using ICU4j

1.I have a very strange error in my web application, I will describe my environment soon after I describe the error better Docker image: tomcat:9.0-jdk11 My location: pt_BR class(ICU4j): com.ibm.icu.text.DateFormat Expected date…
0
votes
0 answers

icu4j: read and write files with differenz charsets

i am using java to parse a folder, and read the files. In the folder are only txt-files. But with different charsets. Some of them are in ISO-8859-1 and some of them are in windows-1252. I need to read the file and create one single file from all.…
Mike
  • 693
  • 1
  • 13
  • 31
0
votes
0 answers

Why Icu4j returns more letters in case-insensitive patterns?

The following code returns regex patterns matching English characters. For matching only lowercase characters LocaleData.getExemplarSet(ULocale.forLanguageTag("en-US"), 0).toPattern(true), LocaleData.getExemplarSet(ULocale.forLanguageTag("en-US"),…
dzieciou
  • 4,049
  • 8
  • 41
  • 85
0
votes
0 answers

Cannot resolve icu4j

In my pom.xml I have many dependencies, but one is not resolved: com.ibm.icu icu4j 70.1 Producing the error: Cannot resolve…
Alon
  • 10,381
  • 23
  • 88
  • 152
0
votes
1 answer

How to use the icu4j Charset implementations and CharsetDecoderICU?

So, I know how to get your average Charset sure, with StandardCharsets.UTF_8 or maybe even Charset.forName("UTF-32LE") for a non-standard, but which implementation am I getting? I would like to use these decoders, use this CharsetDecoderICU with…
Joshua
  • 15
  • 5
0
votes
1 answer

Why is Locale final in Java?

The class java.util.Locale is declared as final, which means that nothing can extend it. The ICU4J project have written an extension of this class - com.ibm.icu.util.ULocale (which is also final), but because of this it can't inherit or be used…
Jakg
  • 922
  • 12
  • 39