Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

charset prob

Status
Not open for further replies.

piti

Technical User
Apr 12, 2001
627
SK
hi

i'm not much into that charset stuff, so i'm not sure if this is the right forum

i have my site in 3 languages, where the phrases are pulled from mysql database depending on the languageid in the url

i have this in the head section for all those languages:
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1250&quot;>

everything worked fine, until now
a friend of mine wanted me to make also polish version of the site, so i entered the polish phrases into my tables and set a new languageid
he told me, i need to switch to iso8859-2 charset for the polish version, so i did it, but the site is not displayed properly, i have some characters rendered as squares

what could be the prob? is it because all the text is from the mysql database?

thanx
 
It could be. But do you have the Polish language installed in your browser? ______________________________________________________________________
TANSTAAFL!
 
i don't know, but i think no

what i found in my ie was only encoding selection, there i have Central European (Windows) set, i've tried all of them, but none displays the page correctly

so this is a browser dependent prob? if i have polish lang. installed i see it ok, if not i got the squares?
 
Both Opera and IE 6 have the ability to specifically add the Polish language to the list of supported languages.

What browser are you using? ______________________________________________________________________
TANSTAAFL!
 
i have ie 5.0 on my devel computer
 
something strange happens here

i just added a part of the page code from the friends server using fopen() and fgets()
it's only one table filled with some text

now when i set the charset on the page to win1250, my part is displayed correctly and the included table part not
when switched to iso8859-2, my part displays squares and text in the included table is ok

is that ok?
 
Just out of curiosity, have you used &quot;iso-8859-2&quot; as the character set, rather than &quot;iso8859-2&quot;? ______________________________________________________________________
TANSTAAFL!
 
Ignore my last post.

It sounds to me like the data itself is not right. ______________________________________________________________________
TANSTAAFL!
 
i've checked the mysql variables on the server where this site runs, the mysql charset is set to win1250
as there is in the mysql doc:

When a client connects to a MySQL server, the server sends the default character set in use to the client. The client will switch to use this character set for this connection.

so php gets the data in win1250 and i can't do anything to display it in iso8859-2? or using the mb_* functions could be of help?
 
I'm wondering if the problem is character set translation when you entered the data.

It seems to me that MySQL should just store strings of 8-bit numbers to store the data. What if Windows trashed the data through character set translation? How did you get the data into the database? ______________________________________________________________________
TANSTAAFL!
 
import from a plain text file (generated as data export from ms sql server) using a php script
 
You've managed to stump the chump.

I'm going to bow out -- I hope someone else has a better insight than I have had. ______________________________________________________________________
TANSTAAFL!
 
:)

as there's probably no solution for this, we decided to make it win1250 as this looks like the ms equivalent for iso8859-2

thanx for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top