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
0
votes
2 answers

Convert an UCS-2 string to UTF-8 using ICU

Can you please help me convert an UCS-2 string to UTF-8 using ICU ? I'm using the following code, but it doesn't work. UErrorCode status = U_ZERO_ERROR; UConverter *conv; char buf[1000]; int32_t buflen; conv = ucnv_open("utf-8", &status); if…
0
votes
1 answer

ICU compiler not found or not working for PHP intl extension

I am trying to install the intl PHP extension for Symfony 2. To install it I need to provide the path to the ICU binaries. I have downloaded and installed ICU on my VM but when I run the configuring for Linux I get: checking for gettimeofday...…
0
votes
1 answer

How do I use ResourceBundle::getLocales()?

Given I have a directory /locales with the files root.res and es.res, which have been generated (using genrb) from the text files as follows: File: root.txt root:table { test:string { "My test text" } } File: es.txt es:table { test:string {…
Frederik Krautwald
  • 1,782
  • 23
  • 32
0
votes
1 answer

Use literals strings with ICU

I'm wondering if there's a way to use literal strings with ICU, I currently use wide character literal string like this: u_strcpy( catColor, L"Yellow0" ); if (u_strcmp( catcolor, L"Yellow0" ) != 0) CatColorIsYellow(); I've heard about…
Punkfloyd
  • 45
  • 4
0
votes
1 answer

Can ICU perform collation comparisons on UTF-16LE data on big endian machines directly?

I have the following code: UCharIterator iter1; UCharIterator iter2; UErrorCode status = U_ZERO_ERROR; if (ENC_UTF16_BE == m_encoding) { uiter_setUTF16BE(&iter1, reinterpret_cast(in_string1), in_length1); …
Bwmat
  • 4,314
  • 3
  • 27
  • 42
0
votes
1 answer

Deployment Symfony 2.4 on Microsoft Azure (git/composer)

For the last two days I'm trying to push my application on Azure but I'm facing problems about the Symfony 2.4 deps (with composer). The main error is : symfony/icu v1.2.1 requires lib-icu >=4.4 -> the requested linked library icu has the wrong…
AlixB
  • 1,208
  • 2
  • 10
  • 19
0
votes
0 answers

Using ICU's UChar as a replacement for wchar?

Since I heard there are many problems with the wchar_t type (compiler-specific width), I was very interested by the International Components for Unicode project. But, ICU seems a bit heavier for my needs. I only need something that could provide an…
Punkfloyd
  • 45
  • 4
0
votes
2 answers

Accessing code points of wchar_t*

I have a function, which gets a wchar_t* as input. Now in this function I have to process code points. Since this program should run on multiple platforms, I have very little knowledge about the encoding in the wchar_t*. I tried to get a conversion…
abergmeier
  • 13,224
  • 13
  • 64
  • 120
0
votes
1 answer

ICU for Mobile(iOS/Droid) devices

Since both iOS and Android use ICU under the hood and provide some functionalities provided by ICU in their own API, Is ICU important in mobile app development. I am looking for best practices in mobile app development considering a scenario where i…
user1294764
  • 103
  • 9
0
votes
0 answers

Apache2.2 won't start after install intl and icu

Good day! I have Centos 5.0 where there was need to install ICU 4.0 or higher to install intl extension. System has had ICU 3.6 so I've searched a way to do this. Followed by this post…
Vdomah
  • 46
  • 1
  • 4
0
votes
1 answer

How to detect whether a unicode char is supported in one encoding in ICU?

I need to detect whether a unicode charactere is supported by a specific encoding using ICU. Some code snippet: ucnv_fromUnicode(conv, &targetIndex, targetLimit, &source, source + sourceLen, nullptr, flush, &err); int8_t len =…
Jichao
  • 40,341
  • 47
  • 125
  • 198
0
votes
1 answer

UTF-8 to UCS2 conversion using icu resulting in gibberish

This is a follow up question to a previous one The issue in that question has been resolved, and now the code is proceeding as expected, however the final output of the utf-8 to ucs2 conversion is gibberish. By that I mean the hex values of the…
0
votes
1 answer

Reduce mac os framework size

I'm developing mac os framework with custom sqlite build with ICU. It's size is about 25Mb. Is there any way to reduce framework size? I tried all required flags (strip dead code etc.), but it just 500Kb smaller. Framework includes ICU and Sqlite…
baron2727
  • 11
  • 1
0
votes
1 answer

How to implement Transliteration of Indic language in iOS

I am trying to implement transliteration of standard English text to one of the Indic(Devnagari) script. According to this post, there is CFStringTransform function in iOS which has capability of handling it if proper ICU constants are passed. I…
amavi
  • 524
  • 4
  • 14
0
votes
2 answers

Deploy Gollum wiki with Engine Yard

Gollum is "A simple, Git-powered wiki with a sweet API and local frontend." It's hosted on GitHub: http://github.com/github/gollum Deploying my site to EngineYard is generating this error. Fetching gem metadata from https://rubygems.org/ Installing…
Evolve
  • 8,939
  • 12
  • 51
  • 63