Page 1 of 1

MySQL character set issues

PostPosted: 07. November 2012 16:48
by Liger314194
Hey Forum,
For some reason MySQL isnt recognizing my charset (cp862) and switches to (latin1) which for Israeli developers means a whole bunch of funky symbols...
Any ideas how to fix that?

much love....



XAMPP:1.8.1
MySQL:5.5.27(i think)
OS:Windows 7 32-bit

Re: MySQL character set issues

PostPosted: 07. November 2012 17:30
by Altrea
Hi Liger314194,

Liger314194 wrote:For some reason MySQL isnt recognizing my charset (cp862) and switches to (latin1) which for Israeli developers means a whole bunch of funky symbols...

This is not enough information to identify the issue, sorry.
How do you see that the charset is switched?
What default charsets are defined for databasemanagementsystem, database, database table?
Which charsets are defined for your datafields?

if the charsets of your database are all setted correct but you get symbols anyways, you have to check the charset of your scripts which put the data to the database and the database connection too.

best wishes,
Altrea

Re: MySQL character set issues

PostPosted: 08. November 2012 06:47
by Liger314194
Hey Altrea, sorry for the lack of details ill try to be as thorough as possible from now on.

Ive got this book about PHP 5 ive been reading and couple of its final chapters are about databases and the Structured Query Language(SQL).
Now the book recommends using MySQL Server to handle databases with php which already comes with XAMPP so thats all good.

First thing im being taught is how to use MySQL through the command line(much like we did with php) but for some reason that proves to
be harder. While booting MySQL.exe using CMD along with the welcome, command syntax and copyright messages i get these two lines:

mysql: Unknown OS character set 'cp862'.
mysql: Switching to the default character set 'latin1'.

Now bare in mind that today is the first time ive learned about this language and my knowledge about it is very limited, so my ability to
answer your debugging question will also be limited, but i promise to do my best and to wrap this is up i really wont mind if you guys talked
to me like you're teaching a child :)

Altrea wrote:How do you see that the charset is switched?
What default charsets are defined for databasemanagementsystem, database, database table?
Which charsets are defined for your datafields?
Altrea


1) I notice the switch obviously from the promt i get about the unknown char set and then the actual switch
2) No idea how to answer that one , sorry
3) huh?

Altrea wrote:if the charsets of your database are all setted correct but you get symbols anyways, you have to check the charset of your scripts which put the data to the database and the database connection too.

Well obviously my databases are all NOT setted correctly seeing as soon as MySQL starts up it switches from a char set that supports hebrew(cp862) to one that doesnt(latin1).

Isnt there a way to change the default character set for the whole server to utf8?
And why doesnt microsoft just make windows operate that way too, from what i looked up its like a one-size-fits-all kind of solution....


P.S: Hebrew characters wont show normally even when created and stored with php at runtime.....

Re: MySQL character set issues

PostPosted: 09. November 2012 03:46
by JonB
A. This is a quick side note - AFAIK, only the MS Professional and Enterprise Desktop OS products directly support multi-lingual operation. I use English, Spanish, Basque & French all on the same machine (I have a second keyboard also). The Home & Starter products (again - as far as I know) - are distributed in localized versions only. OEM MFR's zone-code their machines, much like DVD's.

B. When you say 'the server', you must understand 'the server' is really a suite of programs from completely separate sources, all of which have individual configuration files.

Good Luck.
8)