php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76286 transliterator_transliterate() -> converts "ℌ" into "x"
Submitted: 2018-04-29 07:45 UTC Modified: 2018-04-30 13:32 UTC
From: lars at moelleken dot org Assigned:
Status: Not a bug Package: intl (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lars at moelleken dot org
New email:
PHP Version: OS:

 

 [2018-04-29 07:45 UTC] lars at moelleken dot org
Description:
------------
When I try to convert unicode-text into ascii via  "transliterator_transliterate()" it converts "ℌ" into "x" instead of "H".

- demo: https://3v4l.org/DVIs7

- sample-unicode (for more tests?): https://github.com/voku/portable-utf8/blob/master/tests/fixtures/sample-unicode-chart.txt

Test script:
---------------
$str = 'ℌ';

$str = transliterator_transliterate('NFD; [:Nonspacing Mark:] Remove; NFC; Any-Latin; Latin-ASCII;', $str);

var_dump($str);

Expected result:
----------------
H

Actual result:
--------------
x

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-30 13:32 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2018-04-30 13:32 UTC] ab@php.net
Thanks for the report. The transform used seems incorrect. NFD+NFC should be replaced by NFKC. See https://unicode.org/cldr/utility/character.jsp?a=%E2%84%8C

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC