Jump to content
Chinese-Forums
  • Sign Up

Pinyin and phpMyAdmin and Character Encodings


Recommended Posts

Posted

. . . and other stuff I don't understand.

I'm currently transferring a set of php scripts and a database from my laptop, where everything works perfectly, to webhosting.

Uploaded the scripts no problem, did a local database dump in phpMyAdmin, copied and pasted it into the SQL query box in phpMyAdmin on the server, and it looks fine when I browse the tables.

However, the output from the scripts is mangled - most of the letters with tones on are coming out as question marks.

I'm assuming this is an encoding issue. Everything local is utf-8, including phpMyAdmin. On the server, the scripts are still outputting in utf-8 as they should, while phpMyAdmin is showing iso-8859-1 (I can't change this. The pinyin displays fine in phpMyAdmin).

When I add stuff directly to the database, it all works fine. Using the scripts to add stuff is also fine. It seems to be only the database dump (simple text copy and paste, with the pinyin displaying fine) that's the problem.

It's not a major issue, as it's a small database and reentering the data or something isn't too much hassle. I just have this vague idea that it'd be nice to understand what's happening . . .

Roddy

Posted

Ah, as is so often the case I solved the problem without truly understanding it. I set the phpMyAdmin encoding to UTF-8 under the View menu on my browser, did the database dump again and now it's fine. I wasn't expecting this to work, as I didn't think the encoding change would 'stick' for the form submission, but it did, and it's fine now.

Roddy

Posted

hehe ... i'm glad you and roddy were able to figure things out. :mrgreen:

i've always said: two roddys (roddies) are better than one.

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...