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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kaiwing18@hotmail.com

    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
  • lig

    #2
    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
    internationaliz ation. 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...tionalization).
    Do your research and find out which one will best suit your needs.

    Comment

    • Chung Leong

      #3
      Re: Can't interpret php code when file saved with unicode.

      <kaiwing18@hotm ail.com> wrote in message
      news:d82f3f5c.0 501040809.238dc 70b@posting.goo gle.com...[color=blue]
      > 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[/color]

      Don't save as your files as UCS-2 (aka UTF-16) . Save them as UTF-8 instead.
      PHP will parse them then.


      Comment

      Working...