This is a discussion on Can't interpret php code when file saved with unicode. within the PHP Language forums, part of the PHP Programming Forums category; Hi , I use apache server , php and mysql to implement a multi-language web admin system, in order to display ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi ,
I use apache server , php and mysql to implement a multi-language web admin system, in order to display the required language, the file needed to save with unicode instead of ANSI. But the server cant interpret the php code properly. What should i do? Regards, Ricky |
|
|||
|
i you are saving the multi-byte characters in the HTML -As far as I
know you have only 1 option - using the HTML code for the individual letters. This of course is not ideal when dealing witrh large blocks of text. I would suggest you look into the numerous methods of internationalization. Just off the top of my head (keeping php in mind) I would suggest you look into gettext, IntSmarty (this is what I chose to use), and there are 5 packages in PEAR that you may want to check out (http://pear.php.net/packages.php?cat...ationalization). Do your research and find out which one will best suit your needs. |
|
|||
|
<kaiwing18@hotmail.com> wrote in message
news:d82f3f5c.0501040809.238dc70b@posting.google.c om... > Hi , > > I use apache server , php and mysql to > implement a multi-language web admin > system, in order to display the required > language, the file needed to save with > unicode instead of ANSI. But the server > cant interpret the php code properly. > What should i do? > > Regards, > > Ricky Don't save as your files as UCS-2 (aka UTF-16) . Save them as UTF-8 instead. PHP will parse them then. |