AfriCC/php-epp2

Alternatives to intl translisterate

Closed this issue · 7 comments

When I tried to use intl transliterator_transliterate function, I got a segmentation fault (probably related to my OS and PHP version) but I didn't get time to investigate why it ocurred. I preferred to switch to derick transliterate function (http://derickrethans.nl/projects.html#translit).

It could be great to get alternatives to translit, including a really basic one that doesn't require a PHP extension and make it configurable.

Hi @jbarbede - that is a extension as well, and is deprecated: https://pecl.php.net/package/translit

There is unfortunately no other solution, as using something like iconv is not threadsafe. What OS and PHP version were you using?

I installed intl on Centos 6 with PHP 5.5. At least Derick function works on this configuration.

Maybe you can just offer a basic function to translit, something similar to this gist https://gist.github.com/sgmurphy/3098978 if intl transliterate is not installed.

People requiring full and clean transliteration then should install intl.

That gist is messed up and will do more harm than good - I'd rather fallback to iconv but then output a warning each time "using deprecated function" or similar

ok, it sounds great like that.

Julien Barbedette

On Tue, Apr 21, 2015 at 4:17 PM, Günter Grodotzki notifications@github.com
wrote:

That gist is messed up and will do more harm than good - I'd rather
fallback to iconv but then output a warning each time "using deprecated
function" or similar


Reply to this email directly or view it on GitHub
#3 (comment).

Sorry, but I checked again the comments on: http://za1.php.net/manual/en/function.iconv.php - and the behaviour is just too unpredictable. So I won't replace anything - but this library is anyway "open source" so feel free to modify for your needs :)

Apart from that, with the newest changes (as you do not need type=int) you will also not need this function (it will not be called).

I am going to test all your changes asap. I also added some MX extension to
support rar:info and domain:restore commands, your library is just perfect
to work with EPP :-D.

Julien Barbedette

On Tue, Apr 21, 2015 at 6:20 PM, Günter Grodotzki notifications@github.com
wrote:

Sorry, but I checked again the comments on:
http://za1.php.net/manual/en/function.iconv.php - and the behaviour is
just too unpredictable. So I won't replace anything - but this library is
anyway "open source" so feel free to modify for your needs :)

Apart from that, with the newest changes (as you do not need type=int) you
will also not need this function (it will not be called).


Reply to this email directly or view it on GitHub
#3 (comment).