Skip to content

Instantly share code, notes, and snippets.

@crzdeveloper
crzdeveloper / libicu-database-update.md
Last active August 17, 2017 09:01
Partial ICU database update (libicu)

ICU library provides some facilities to work with Unicode and Globalization. The problem is that this library is installed system-wide and it is not so trivial to update it. We are going to update only some parts of the ICU Database, but the rest of the Database can be updated in the same way. You just need to know what exactly you need to change.

Abstract

This manual is not bound to PHP, it will work for other languages as well. The PHP uses php-intl extension which uses in its turn libicu and we are going to update some of the libicu database parts.

This manual might be not so good for Java users, because as for Java the ICU4J must be used and the approach can differ.

We'll try to solve two problems: outdated Timezone DB and IDN to ASCII conversion of domain names (IDN to Punycode conversion, idn_to_ascii() and idn_to_urf8() functions in PHP).