Bug #66278 [Opn->Nab]: Transliteration with iconv() on Windows

From: Date: Thu, 27 Mar 2014 11:26:42 +0000
Subject: Bug #66278 [Opn->Nab]: Transliteration with iconv() on Windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184921@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66278&edit=1 ID: 66278 Updated by: ab@php.net Reported by: kacper at kacper dot se Summary: Transliteration with iconv() on Windows -Status: Open +Status: Not a bug Type: Bug Package: ICONV related Operating System: Windows PHP Version: 5.4.22 Block user comment: N Private report: N New Comment: This is how iconv handles it, please see http://git.savannah.gnu.org/cgit/libiconv.git/tree/lib/translit.def#n93 . The "ä" is represented as one char U-00E4, so what is done is completely how iconv thinks it should be. I guess you'll see yet another handling on Mac, though have no machine to test. Anyway these are the issues with unicode normalization, not with PHP. Thanks. Previous Comments: ------------------------------------------------------------------------ [2013-12-12 18:24:06] kacper at kacper dot se Description: ------------ When iconv is used for transliteration on Linux, characters such as ä become ae. On Windows, iconv returns "a instead of ae (note the double quote before the letter). Test script: --------------- $utf8_umlaut_a = 'ä'; // On Linux ä = ae setlocale(LC_CTYPE, 'de_DE'); echo iconv('UTF-8', 'ASCII//TRANSLIT', $utf8_umlaut_a); // On Windows ä = "a setlocale(LC_CTYPE, 'german'); echo iconv('UTF-8', 'ASCII//TRANSLIT', $utf8_umlaut_a); Expected result: ---------------- On Windows iconv should return the same result as on Linux. ä should be returned as ae and not "a. Actual result: -------------- ä becomes "a. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66278&edit=1

« previous php.bugs (#184921) next »