encoding problem in mysql database

Problems with the Windows version of XAMPP, questions, comments, and anything related.

encoding problem in mysql database

Postby cmf_334 » 29. November 2008 13:59

Dear Sir,
Can anyone tell me how can i set default_character_set = ut8 to my.cnf file?
i set this character setttings to my.ini via mysqldadmin but this is not working .
i am facing this problem for arabic characters. i see in my .php file the arabic charactes as ??????.

please try to reply to me as early as possilble.

Regards,
Faruk Chowdhury.
cmf_334
 
Posts: 4
Joined: 29. November 2008 13:52

Postby Wiedmann » 29. November 2008 14:05

Can anyone tell me how can i set default_character_set = ut8 to my.cnf file?

Open the file my.cnf (\xampp\mysql\bin) with a texteditor and change/add the settings you need. Restart MySQL.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby cmf_334 » 29. November 2008 14:29

Thanx for your quick response

How can i open \xampp\mysql\bin\my.cnf file. because when right clicked on this file there only OPEN option comes and after clicking on this nothing is open.
it seem to as a my SpeedDial shortcut .
so please tell me how can edit this file.

Regards,
Faruk Chowhury.
cmf_334
 
Posts: 4
Joined: 29. November 2008 13:52

Postby Wiedmann » 29. November 2008 15:16

How can i open \xampp\mysql\bin\my.cnf file.

Drag 'n drop the file in your texteditor.
Or use the menu "File -> Open" in your texteditor.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby cmf_334 » 29. November 2008 18:27

Wiedmann wrote:
How can i open \xampp\mysql\bin\my.cnf file.

Drag 'n drop the file in your texteditor.
Or use the menu "File -> Open" in your texteditor.


Thank you for your response.
now i can edit the\xammp\mysql\bin\ my.cnf according to your drag and drop method.
i added default-character-set = utf8 and
also in \xammp\apache\bin\php.ini with
default_charset = "UTF-8" then restarted the servers.

But still i can't see the arabic charcters. it comes like as ??????.
so can you tell me where is the problem?

Regards,
faruk chowdhury
cmf_334
 
Posts: 4
Joined: 29. November 2008 13:52

Postby Wiedmann » 29. November 2008 19:36

so can you tell me where is the problem?

- wrong data in MySQL (you can verify this with e.g. phpMyAdmin)
- and/or data is stored with a wrong charset in MySQL (you can verify this with e.g. phpMyAdmin)
- and/or your PHP script is using a wrong charset for the connection
- and/or the html page set a wrong charset
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: encoding problem in mysql database

Postby cmf_334 » 14. December 2008 07:46

Dear Sir,
Thank you for your reply.
i am using apache 1.3.33 - php 4.3.10 - mysql 4.1.9.
now i want to use update apache php and mysql versions via XAMMP.
when i am storing data in updated mysql database i can't see arabic characters for previous data. but for new data this is not making any problem.
i checked via phpmyadmin and i see that it shows the arabice characters properly but in my php scripts it does not show properly.i am using ajax technique to view data.
i set configuration in php ,mysql and html pages like as:

1.default_charset = "UTF-8"[php.ini]
2.[im my.ini]

[mysqld]

datadir=${path}/mysql/data
basedir=${path}/mysql
bind-address=127.0.0.1
; Uncomment for use on USB key
; skip-innodb
default-character-set=utf8
[client]
default-character-set=utf8
3.
[in html/php pages]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

so can you tell me how can i fix this problem?

Thanks in advance.

Regards,
Faruk Chowdhury.
cmf_334
 
Posts: 4
Joined: 29. November 2008 13:52


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 103 guests