Link to home
Start Free TrialLog in
Avatar of robballi
robballi

asked on

how to install spanish character set?

Ho do i install spanish character set.
I tried:

Best support for Multilingualism, but it cannot handle inserts like the following word:

Zuñiga

that is a spanish word!
Avatar of Bernard Savonet
Bernard Savonet
Flag of France image

short answer: put everything in UTF-8
- your php scripts
- your html code
- your data in MySQL

More info:
- you cannot solve the problem just at MySQL level, you must handle it also at input time and display time
- any variation along the chain of process will result in weird displays
Avatar of robballi
robballi

ASKER

fibo:

Could you give more specifics of how to do what you are saying?
Thanks a lot!
There are few good complete yet easy to understand tutorials on this subjects.

I would suggest that you read
http://www.sitepoint.com/article/guide-web-character-encoding/
http://www.sitepoint.com/blogs/2006/03/15/do-you-know-your-character-encodings/ (print this one, you need to read back and forth!)

Also go to http://www.phparch.com/c/magazine/issue/54 register and download this issue of PHP|Architect: the article from Delahunt on this subject is really remarkable and will help you to see how all things should be put in place (doing it being more diffcult though)

In handling a project of this type (eg, see http://www.mae.u-paris10.fr/limc-france/ ) some years ago, I relied heavily on 2 tools:
- Editor: I was using the commercial UltraEdit ($50) to handle securely UTF8 and conversions between ASCII and UTF8. I would guess that the open-source Notepad++ gives today similar facilities.
- PHP IDE: I had tested at this time Zend Studio and phpEd from Nusphere. The second was NOT able AT THAT time to handle real UTF8, ie mixing accented characters (Spanish, French..) with Greek or Russin characters, while Zend Studio could do it
- MySQL: 4.1 was not yet available, I was however able to proceed with some pragmatic approach, storing string "as is" (or almost) into MySQL, and displaying the results in PhpMyAdmin... whether within phpmyadmin or with my php programs, in some cases I had to test/debug in changinfg the character set codepage of the display.. but my problems came from the fact that the initial data that was transferred from Access to MySQL.
Dear fibo:

thanks a lot for your help.
But what specifics could i do to solve the problem.
It is something wrong with mysql, since:

for instance a typical spanish last name is: Zuñiga
by default querying that data one gets through php:       
Zu¤iga

and putting mysql_query( 'set names utf8' ) one gets the same:
Zu¤iga

i tried with ultraedit to convert it the sql inserts from asci to utf8 but nothing good resulted too.

I have to tell you that i have a third party mysql db driver that connects to mysql, but now i get:

Zu¤iga

The funny thing is if you query throuhg the command line one gets: Zuñiga.
this is through a windows application!!!

What one has to do so mysql?

I have mysql version:
5.0.51a'community-nt
ASKER CERTIFIED SOLUTION
Avatar of Bernard Savonet
Bernard Savonet
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No real solution was given.
Just comments.
Hi Robballi,

What was the result of trying the last code snippet I suggested?
Did you get back in your display any "normal-looking" display?
What was then the codepage of your browser?
Which other attempts did you make and what was their result?