VARCHAR issue

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
speedy33417
Forum Contributor
Posts: 128
Joined: Sun Jul 23, 2006 1:14 pm

VARCHAR issue

Post by speedy33417 »

I'm doing a photo album that has Hungarian description for some pictures. Hungarian letters can be like this: Éíáú...

For some reason when a non-English letter should be displayed I get a "?" instead. How should I deal with it?

Thanks.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I've never had to deal with non-English character sets, but I believe you can set the character encoding for a field.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
shneoh
Forum Commoner
Posts: 38
Joined: Mon Sep 25, 2006 2:23 am
Location: Malaysia

Post by shneoh »

I am dealling with bytes charactors too (Chinese). Maybe my experience can help a bit:

1. Check your default charactor encoding of your output page. A simple find out is directly go to View-->Charactor Encoding and select the one you think mostly suits.
2. If you have used a wrong charactor encoding of your input page, problem will appears on your output page eventhough you have selected a correct encode on your output page.

I am a bit confused by the MySQL's encoding machanism, so I just tried my best to use the default on it and work hard on the script page.
User avatar
speedy33417
Forum Contributor
Posts: 128
Joined: Sun Jul 23, 2006 1:14 pm

Post by speedy33417 »

Thanks shneoh. That's what I was experiencing as well. I didn't pay attention to selecting the encoding when creating my tables. Now that the fields are populated even if I switch to the right encoding it won't change anything when echoing my descriptions. However if I recreate that column using the right encoding it works fine.
Kind of strange...
Post Reply