Can't interpret php code when file saved with unicode.

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2005
kaiwing18@hotmail.com
 
Posts: n/a
Default Can't interpret php code when file saved with unicode.

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
Reply With Quote
  #2 (permalink)  
Old 01-04-2005
lig
 
Posts: n/a
Default Re: Can't interpret php code when file saved with unicode.

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.

Reply With Quote
  #3 (permalink)  
Old 01-05-2005
Chung Leong
 
Posts: n/a
Default Re: Can't interpret php code when file saved with unicode.

<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.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0