Questions tagged [icu]

The International Components for Unicode is a set of cross-platform open source C/C++ and Java libraries for Unicode and globalization support. It is developed by the Unicode Consortium. Use this tag when you have a question about using the ICU. Be sure to include the appropriate language tag and the version of ICU that you are using.

The International Components for Unicode supports C/C++ (ICU4C) and Java (ICU4J), and is available under an open source license. See the ICU-TC home page for documentation and licensing details.

It uses .

771 questions
46
votes
3 answers

node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)

I was trying to upgrade node version on our CI environment from node 6 to node 8. I updated the full-icu version as well. the $NODE_ICU_DATA is set to /usr/lib/node_modules/full-icu but still get this error node: could not initialize ICU (check…
Pooja Gurav
  • 463
  • 1
  • 4
  • 8
30
votes
2 answers

What does 'ICU' stand for in Android SDK?

Have seen new packages in Android SDK docs. All of them are available in API level 24 which corresponds to Android Nougat and seem to replace the 'java.xxx' packages by 'android.icu.xxx'. For example: The java.text.DateFormat package is duplicated…
BamsBamx
  • 4,139
  • 4
  • 38
  • 63
25
votes
3 answers

Is there an STL and UTF-8 friendly C++ Wrapper for ICU, or other powerful Unicode library

I need a good Unicode library for C++. I need: Transformations in a Unicode sensitive way. For example sort all strings in a case insensitive way and get their first characters for index. Convert various Unicode strings to upper and to lower case.…
artyom
24
votes
2 answers

Looking for simple practical C++ examples of how to use ICU

I am looking for simple practical C++ examples on how to use ICU. The ICU home page is not helpful in this regard. I am not interested on what and why Unicode. The few demos are not self contained and not compilable examples ( where are the…
user754425
  • 437
  • 1
  • 4
  • 10
22
votes
1 answer

Using text-icu library in Haskell on Mac OS

I am trying to use the text-icu library as a dependency in a cabal package on Mac OS. I have icu installed but when I try to build my package cabal gives me this error: Missing C libraries: icui18n, icudata, icuuc I'm am unsure what debugging…
user945202
  • 221
  • 1
  • 3
21
votes
3 answers

Cross-platform iteration of Unicode string (counting Graphemes using ICU)

I want to iterate each character of a Unicode string, treating each surrogate pair and combining character sequence as a single unit (one grapheme). Example The text "नमस्ते" is comprised of the code points: U+0928, U+092E, U+0938, U+094D, U+0924,…
kizzx2
  • 18,775
  • 14
  • 76
  • 83
20
votes
1 answer

Different behaviour of Intl.NumberFormat in node and browser

If I run this code in the browser and node I obtain two different results: const moneyFormatter = new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR', minimumFractionDigits: 2 }); moneyFormatter.format(1); Browser: 1,00…
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
19
votes
10 answers

Implementing internationalization (language strings) in a PHP application

I want to build a CMS that can handle fetching locale strings to support internationalization. I plan on storing the strings in a database, and then placing a key/value cache like memcache in between the database and the application to prevent…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
19
votes
2 answers

R/regex with stringi/ICU: why is a '+' considered a non-[:punct:] character?

I'm trying to remove non-alphabet characters from a vector of strings. I thought the [:punct:] grouping would cover it, but it seems to ignore the +. Does this belong to another group of characters? library(stringi) string1 <- c( "this is a…
screechOwl
  • 27,310
  • 61
  • 158
  • 267
18
votes
3 answers

ICU vs Boost Locale in C++

I'm considering using ICU or Boost Locale. What are the pros and cons of each? I understand both use ICU, but ICU is hidden by Boost Locale. According to Boost Locale's rationale page: "...the entire ICU API is hidden behind opaque pointers and…
user1237077
16
votes
2 answers

Where can I find a specific set of collation rules for equality comparison of strings?

We all know that using String's equals() method for equality comparison will fail miserably. Instead, one should use Collator, like this: // we need to detect User Interface locale somehow Locale uiLocale = Locale.forLanguageTag("da-DK"); // Setting…
Paweł Dyda
  • 18,366
  • 7
  • 57
  • 79
16
votes
3 answers

icu4j cyrillic to latin

I'm trying to get Cyrillic words to be in latin so I can have them in urls. I use icu4j transliterator, but it still gives weird characters like this: Vilʹândimaa. It should be more like viljandimaa. When I copy that url these letters turn to %..…
ivar
  • 819
  • 4
  • 12
  • 19
14
votes
5 answers

How to build ICU so I can use it in an iPhone app?

How do I configure and build ICU so I can link it to my iPhone app? I'm maintaining an iPhone app that uses a SQLite database. Now I have to compile with ICU support enabled (SQLITE_ENABLE_ICU). I've got the latest ICU source. The configure flags…
egrunin
  • 24,650
  • 8
  • 50
  • 93
14
votes
1 answer

Update android time zone data

I am running Android 4.4.3 on my device and of course it has outdated time zones and I am trying to update the tzdata in /system/usr/share/zoneinfo. However replacing the file straight away does not update the time zone. Since ICU keeps its own copy…
Robin Chander
  • 7,225
  • 3
  • 28
  • 42
14
votes
2 answers

Transliteration from Hindi to English on Android without using Google API

I want to transliterate Hindi text into English in following way Hindi - "आपका स्वागत है" to English - "aapka swagat hain" I don't want to use Google's Translate API or any other translate API. If I use them it will end up giving me the translated…
Manishika
  • 5,478
  • 2
  • 22
  • 28
1
2 3
51 52