Inserting Arabic Letters into mysql table

Discussion in 'Databases' started by Shaimaa, Feb 17, 2010.

  1. #1
    I want to ask about how to insert Arabic letters in My SQL database without being converted to another strange letters

    when I create the table I wrote the following in table creation
    //-----------------------------------------

    CREATE TABLE IF NOT EXISTS `person` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) CHARACTER SET UTF8 COLLATE utf8_bin NOT NULL,
    `email` varchar(50) NOT NULL,
    `bloodType` varchar(50) NOT NULL,
    `userType` varchar(50) NOT NULL DEFAULT 'user',
    `lastDonate` date NOT NULL,
    `adress` varchar(50) CHARACTER SET UTF8 COLLATE utf8_bin NOT NULL,
    `telephone` int(11) NOT NULL,
    `mobile` int(11) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;

    //-----------------------------------------
    the fields I mean are name and address

    What can I do?

    When I am using PHP MyAdmin to insert into this table the arabic letters appears very well but when I'm using PHP Interface to insert into the same table the letters changed into something like:

    شيماء Ù…Ø Ù…Ø¯ عبد Ø§Ù„ÙØªØ§Ø Ø¹Ù„ÙŠ

    I don't know what to do?
     
    Last edited: Feb 18, 2010
    Shaimaa, Feb 17, 2010 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    crivion, Feb 18, 2010 IP