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
13
votes
1 answer

i18n for react, formatjs, react-intl

I want to use ICU standard for my i18n in my react app. I want to store my language files like http://userguide.icu-project.org/locale/localizing#TOC-.txt-resource-bundles : de { key1 { "Deutsche Sprache " "schwere Sprache" } key2 {…
DeBoer
  • 551
  • 1
  • 7
  • 16
13
votes
3 answers

C++ UTF-8 output with ICU

I'm struggling to get started with the C++ ICU library. I have tried to get the simplest example to work, but even that has failed. I would just like to output a UTF-8 string and then go from there. Here is what I have: #include…
Isaac
  • 133
  • 1
  • 4
12
votes
3 answers

Named capture groups in NSRegularExpression - get a range's group's name

Apple says that NSRegularExpression is based on the ICU Regular Expression library: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSRegularExpression_Class/ The pattern syntax currently supported is that specified by…
Dai
  • 141,631
  • 28
  • 261
  • 374
11
votes
1 answer

C++: Will you choose boost::date_time or icu::date/time library?

My application requires custom time and date setting capabilities. I checked both ICU and boost::date_time libraries. Both appears to meet my requirements from a completeness point of view. I would like to know if there is any preference between the…
notifyroy
  • 139
  • 1
  • 8
11
votes
1 answer

unicode support in android ndk

I have a large C/C++ library that I need to use as part of an Android NDK project. This library needs to be able to intelligently process UTF8 strings (for example, conversion to lowercase/uppercase). The library has conditional compilation to punt…
paleozogt
  • 6,393
  • 11
  • 51
  • 94
11
votes
6 answers

How to install stringi library from archive and install the local icu52l.zip

We're bumbling through making some R code work in a production environment and as part of that we're installing some R packages as follows: # Default directories and mirrors WORKING_DIR <- "/srv/foo/bar/baz" LIB_DIR <- paste( WORKING_DIR,…
Adam Taylor
  • 7,534
  • 8
  • 44
  • 54
11
votes
1 answer

How can I change NumberFormatter::parseCurrency() behavior of accepting white space and non breaking space?

I'm trying to parse localized currency strings to currency and float value. Everything works well for a while, now we experiencing some problems. It seems that NumberFormatter::parseCurrency uses an additional invisible…
nofreeusername
  • 267
  • 1
  • 12
10
votes
1 answer

Postgres 12 case-insensitive compare

I'm attempting to move a SQL Server DB which is used by a C# application (+EF6) to Postgres 12 but I'm not having much luck with getting case-insensitive string comparisons working. The existing SQL Server db uses SQL_Latin1_General_CP1_CI_AS…
Ziloni
  • 101
  • 1
  • 6
10
votes
2 answers

NumberFormatter::SPELLOUT spellout-ordinal in russian and italian

this code works for english, spanish and german ordninal numbers, but with russian or italian ordninal numbers it doesn't work. 'ru-RU','it-IT' also don't work I get for example in russian for 2 -> два (this is the cardinal number) , but I want the…
Grischa
  • 70
  • 8
  • 26
10
votes
3 answers

Build boost + ICU under Windows VC++ 2010 static linking

I tried now almost a week to build a reliable boost + ICU libraries under Windows and VC++ as STATIC libraries under x86 system (so I won't need any runtime dll's when). I mostly need boost regex with Unicode support and boost.locale.icu. Couldn't…
bsteo
  • 1,738
  • 6
  • 34
  • 60
10
votes
3 answers

PHP 5.3 seems to be missing Intl extension by default

My system is Ubuntu 12.04, PHP 5.3, and I'm trying to run some basic Intl code like this:
Desmond Hume
  • 8,037
  • 14
  • 65
  • 112
9
votes
1 answer

Are ICU resource bundles meant for message translation resources

I understand the localization part of ICU - date, time and currency formats, collation, etc. When it comes to message translation, I see people stating that ICU does not provide functionality for message translation - check for example this SOF…
Basel Shishani
  • 7,735
  • 6
  • 50
  • 67
9
votes
2 answers

Azure App Service seems to have NLS enabled in .NET 5 mode

After spending countless of hours on getting to the core of a bug, I eventually boiled down a problem to the use of string.Compare with StringComparison.InvariantCultureIgnoreCase in .NET 5. Consider the following two dotnetfiddles: .NET 4.7.2:…
Lennard Fonteijn
  • 2,561
  • 2
  • 24
  • 39
9
votes
4 answers

undefined reference to `icu_56::UnicodeString::UnicodeString(signed char, unsigned short const*, int)'

I am running ubuntu, and I can build ICU I have included: #include using namespace icu; This is my build method for ICU: CPPFLAGS="-DU_USING_ICU_NAMESPACE=0" CPPFLAGS="-DU_CHARSET_IS_UTF8=1" export CFLAGS="-DU_CHARSET_IS_UTF8=1…
Chris
  • 2,340
  • 6
  • 40
  • 63
9
votes
3 answers

UnicodeString to char* (UTF-8)

I am using the ICU library in C++ on OS X. All of my strings are UnicodeStrings, but I need to use system calls like fopen, fread and so forth. These functions take const char* or char* as arguments. I have read that OS X supports UTF-8 internally,…
zfedsa
  • 93
  • 1
  • 1
  • 3
1
2
3
51 52