icu

UnicodeString w/ String Literals vs Hex Values

白昼怎懂夜的黑 提交于 2019-12-25 03:37:12
问题 Is there any conceivable reason why I would see different results using unicode string literals versus the actual hex value for the UChar. UnicodeString s1(0x0040); // @ sign UnicodeString s2("\u0040"); s1 isn't equivalent to s2. Why? 回答1: The \u escape sequence AFAIK is implementation defined, so it's hard to say why they are not equivalent without knowing details on your particular compiler. That said, it's simply not a safe way of doing things. UnicodeString has a constructor taking a

ICU files needed during run time

佐手、 提交于 2019-12-24 17:04:47
问题 In order to understand ICU and its APIs, I wrote a sample program and the libraries this code would link against are -licuuc and -licui18n. The libraries were available because the libicu-devel.x86_64 package was installed on the test system. In my quest to understand how to integrate ICU library with my application that is targeted for a centOS platform, I stumbled across this page, which says: For simple use of ICU's predefined data, this section on data management can safely be skipped.

How do I install Sylius on Bluehost or any other server that has an old version of ICU installed?

只愿长相守 提交于 2019-12-24 16:14:06
问题 I have been trying to get Sylius installed on my Bluehost server which is running on shared hosting and while I do have SSH access, it is somewhat limited. It did not come with the php intl extension and the version of ICU on it is 4.2 which produces errors when installing Sylius because it wants a newer version. 回答1: I tried this on a clean install of Sylius on my Bluehost server and got it to work. I had previously installed the intl extension on my BlueHost server following https://my

Transliteration with Android

别说谁变了你拦得住时间么 提交于 2019-12-24 03:23:58
问题 I want to transliterate (not translate!) text from arbitrary (as far as possible) languages to English in an Android app. Is there a built-in way? I've found https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/libcore/icu/Transliterator.java but it doesn't seem to be available by default (at least the IDE doesn't find it). Do I simply need to add this code, as suggested by the comment in Where can I get a JAR to import libcore.io?? Alternately, I could add ICU4J to

Which Regular Expression flavour is used in Python?

人走茶凉 提交于 2019-12-23 16:15:12
问题 I want to which RegEx-Flavour is used for Python? Is it PCRE, Perl compatible or is it ICU or something else? 回答1: It's compatible enough w/ Perl, meaning most Perl expressions will work unmodified. It aims to be Perl compatible but, of course, there are some minor differences. It, technically, uses its own flavor of regular expressions. For instance, named groups were offered in Python regex long-before other implementations adopted the syntax. It also supports Unicode out of the box. Most

How to get the language name in native language?

烂漫一生 提交于 2019-12-23 10:57:25
问题 This is my first time using ICU API, and I'm having a very hard time trying to find out something that I assumed to be very simple: to get a given locale/language name in the native language (instead of in English) Examples: fr -> Français en -> English pt_BR -> Português Brasileiro, or "Português (Brasil)" es_ES -> Español Iberico, or "Español (España)" As a reference, in babel I can get a given locale name in any language, native being the default: >>> import babel >>> locale = babel.Locale

How to use Locale::acceptFromHttp without a filter list?

别说谁变了你拦得住时间么 提交于 2019-12-23 08:06:19
问题 locale_accept_from_http is a basic wrapper around ICU's API uloc_acceptLanguageFromHTTP but the PHP/PECL implementation seems fundamentally flawed that it uses the systems entire set of locales instead of taking a list as a parameter? For example say a user has HTTP_ACCEPT_LANGUAGE = zh-HK;q=0.2, fr , i.e. the user reads Traditional Chinese or French, preferring the latter. You have, for example, a news site that offers articles in say Traditional Chinese and Simplified Chinese. Using the API

Update ICU extension within xampp?

梦想与她 提交于 2019-12-23 03:07:10
问题 I'm running xampp and I need to upgrade ICU (php_intl extension) to the latest version - I downloaded 54 from the ICU page but unsure how to go about upgrading it. There is a bin , include and lib folder - where do I put these files and do I have to do anything else? 回答1: To upgrade existing ICU in you XAMP installation you'll need to: copy php_intl.dll to your_xamp_folder/php copy all the icu*.dll files to your_xamp_folder/apache/bin check if extension=php_intl.dll is enabled in your_xamp

libicui18n.so.52: cannot open shared object file

拟墨画扇 提交于 2019-12-22 12:26:21
问题 I have been using libicu to detect charset in my node app that runs inside of docker, ubuntu. this is done through the module node-icu-charset-detector that uses the libicu-dev package, which I install prior to the npm package. It all worked fine but I suddently get the error module.js:356 Module._extensions[extension](this, filename); ^ Error: libicui18n.so.52: cannot open shared object file: No such file or directory at Module.load (module.js:356:32) at Function.Module._load (module.js:312

How to debug linker errors? Getting undefined reference errors when statically linking ICU

纵然是瞬间 提交于 2019-12-22 10:46:58
问题 I've built the static libraries for ICU 49 and 50 but when linking with either one of them I still get 667 linker errors like the ones below. How can I approach debugging this and figuring out what the problem is? The ICU support list has offered no help at all. clang++ -ccc-gcc-name g++ -Wl,-E -o velocity main.o city.o auto_lua.o obj_builder.o index.o obj.o str.o db.o datetime.o msg_parser.o task_scheduler.o gc.o global_settings.o transaction.o schema.o skip_node.o util.o thread_context.o