Hello there everyone!
In chapter 14, i found the collation easy and simple to accomplish using the Collator object in PHP 5, but i haven't yet been able to accomplish transliterstion into different languages and character sets( Script 14.4 Trans.php ). I've tried to use iconv to get script 14.4 to work, but so far, it has failed me. And looking at the manual, the Transliterator object should be able to help me do this, but the documentation is vague and unsatisfactory at best. Has anyone else tackled transliteration in script 14.4 using PHP 5?
Chapter 14: Transliteration Using Php 5.3.8
Started by
MrRoboto
, Dec 2 2011 11:42 PM
iconv transliteration charset setlocale
2 replies to this topic
#1
Posted 2 December 2011 - 11:42 PM
#2
Posted 7 December 2011 - 7:17 PM
Sorry I haven't replied yet; been very busy. Let me see if I can't provide you with the exact code in a couple of days.
#3
Posted 28 January 2012 - 11:25 AM
Terribly, terribly sorry for the delay on this. I've been wrapping up a book (way behind schedule) that I just finished two days ago. Then I had to install a custom version of PHP. The good news is that I was able to fix this, and the fix is easy. The bad news is that it requires PHP 5.4. Once you have PHP5.4, you only need to change the function call in trans.php:
echo "<p>$me is " . transliterator_transliterate ("Latin-$script", $me) . " in $script.</p>\n";
Originally the function call was:echo "<p>$me is " . str_transliterate($me, 'Latin', $script) . " in $script.</p>\n";I just tested it myself and it works fine. Let me know if you have any questions or problems. Apologies again for the delay!
Also tagged with one or more of these keywords: iconv, transliteration, charset, setlocale
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide →
PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition) →
Chapter 15: Message Board, The General Subject Of Unicode Safe DataStarted by markifornia , 24 Jul 2012 |
|
|










