Forum Moderators: coopster

Message Too Old, No Replies

Turkish characters

not loading into mysql properly

         

adwhite

9:55 am on Mar 7, 2006 (gmt 0)

10+ Year Member



Hi,

I'm trying to load Turkish words (Turkish uses an extended character set) into mysql

A sample of the text I’m trying to load is here: -

iþ ortaðý olarak görülür.

I have tried my database table as :-

latin5_turkish_ci
utf8_turkish_ci
and I have tried the specific field with a combination of the various collations.

the data looks alright as it’s going into mysql but when I look at it within the field it’s not right and when I extract it it’s not right.

I have tried specifying a character set of utf8 when connecting to the database and I’ve tried without, neither makes much difference.
If I load this text into an include file (which I save as UTF-8) it comes out correctly when I display the html page.
I have tried the html page with a character set of UTF-8 or iso-8859-9, both display the Turkish from the include file correctly but the stuff out of the database
is still not right.

I'm tearing my hair out here, so any help would be appreciated (and if the text displays properly from this post then this set up is correct)

adwhite

9:57 am on Mar 7, 2006 (gmt 0)

10+ Year Member



When I change the encoding on this page to turkish iso the characters come out correctly - so the data is being stored in mysql correctly, so if someone from webmasterworld could explain what they do that would be great.

coopster

1:07 pm on Mar 7, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



We are a little confused at this point, is the text being stored in the MySQL table properly now or no? The first step is to determine if the data has been stored properly.

adwhite

2:26 pm on Mar 7, 2006 (gmt 0)

10+ Year Member



Hi,

When I load it into mysql on my host it's not being extracted correctly, however in your system (I'm assuming posts are stored in mysql) it's working fine.

When I look at the data stored in mysql on my host I have :-

i? orta? olarak görülür

which is how it displays in html.

Your system seems to be storing correctly and displaying correctly (when the right encoding is used)

adwhite

12:15 am on Mar 8, 2006 (gmt 0)

10+ Year Member



Hi,

I might have solved this, and the fact that the data was displaying correctly here gave me the clue.

I was inputing data via phpmyadmin and that wasn't working, but when I ran an insert through a php program the data displayed in mysql as iş ortağı olarak görülür. but extracted and displayed correctly in html.

I can load my data via php but if anyone can suggest how I can turn my data into this gobbledygook without having to insert it via php then that would be helpful.

Cheers

Andy