How to use persian strings in "Delphi For PHP"

Please discuss general Delphi programming topics here.

How to use persian strings in "Delphi For PHP"

Postby Sezar » August 3rd, 2007, 3:24 pm

I just realized,delphi for php doesn't support persian strings well.
the persian strings known as non-ascii characters.
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Postby Kambiz » August 3rd, 2007, 10:11 pm

It does.

Use UTF-8 encoding, and don't forget to send encoding to the client.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2424
Joined: March 7th, 2003, 7:10 pm

Postby Sezar » August 4th, 2007, 2:19 pm

OK! :P
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

UTF-8 encoding

Postby geowink » August 15th, 2007, 5:46 pm

And just how do I go about doing the UTF-8 encoding?
George
geowink
Junior Member
Junior Member
 
Posts: 37
Joined: November 29th, 2005, 3:59 am
Location: La Grange, Illinois

Re: UTF-8 encoding

Postby Kambiz » August 15th, 2007, 10:28 pm

geowink wrote:And just how do I go about doing the UTF-8 encoding?

  1. Save your files as UTF-8
  2. Use meta tag in your HTML files to specify character encoding as follow:
    Code: Select all
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  3. If appropriate, use HTTP header to specify character encoding (see PHP header function).
  4. In your database, set character encoding of string fields to UTF-8
  5. If using MySQL, set transfer encoding of the connection to UTF-8 using the following SQL:
    Code: Select all
    SET NAMES 'utf8';
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2424
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron