Connecting Tech Pros Worldwide Help | Site Map

Unicode Support for PHP5

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 18th, 2008, 01:15 AM
Roberto
Guest
 
Posts: n/a
Default Unicode Support for PHP5

When will PHP get Unicode support for PHP5? I realize that English is
what everyone speaks when they want to do business, but I potentially
could be not getting clients for my freelancing work simply because I
program in PHP and PHP doesn't support their character set. This
problem has been known for awhile now, mentioned in lots of forums and
recently gotten major exposure from the popular Joel On Software blog.
Yet I see that the Unicode module isn't ready yet even after two
year's effort on it.

  #2  
Old March 18th, 2008, 02:25 AM
Michael Fesser
Guest
 
Posts: n/a
Default Re: Unicode Support for PHP5

..oO(Roberto)
Quote:
>When will PHP get Unicode support for PHP5?
Native Unicode support will come with PHP 6.
Quote:
>I realize that English is
>what everyone speaks when they want to do business, but I potentially
>could be not getting clients for my freelancing work simply because I
>program in PHP and PHP doesn't support their character set. This
>problem has been known for awhile now, mentioned in lots of forums and
>recently gotten major exposure from the popular Joel On Software blog.
What exactly is your problem? I already use Unicode (UTF-8) for quite a
while without any trouble. You just have to know the limitations in PHP
5 and how to work around them. Some more details might help.

Micha
  #3  
Old March 18th, 2008, 10:05 AM
Toby A Inkster
Guest
 
Posts: n/a
Default Re: Unicode Support for PHP5

Roberto wrote:
Quote:
When will PHP get Unicode support for PHP5?
Full Unicode support is due in PHP 6. Developer previews are already
available, and Unicode support on them is mostly pretty good.

But even in PHP 5 (and 4), Unicode output is mostly usable. You just have
to remember that the built-in string functions are not Unicode-aware, and
treat text as strings of octets instead of multi-byte characters. So for
example:

PHP 5: echo strlen('ビ'); // prints "3"
PHP 6: echo strlen('ビ'); // prints "1"

PHP 5 is usable for non-ASCII character sets -- it just means you have to
think about string functions a little more carefully. The mbstring module
<http://www.php.net/mbstringis a great help too.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 11:20.]

The Semantic Web
http://tobyinkster.co.uk/blog/2008/03/09/sw/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.