Jump to content

phpmyadmin charset


simpli

Recommended Posts

Hi, I  am using phpmyadmin 3.1.5. Zend Framework with mysql 5.1.34.

I have created fields that I want to be able to receive accented characters (french but other western accented characters as well).

Firstly, in phpmyadmin, you use to be able to set the charset and the collation separately but now I only see a collation field where you have tons of options some of them look like charset options.

 

My problem is if I enter accented characters through the web site, I see them fine in the browser but when I look in the database it comes out as jibberish (as if the browser wasnt reading the utf characters). When I look at the view page info with phpmyadmin, it's in UTF but the content language meta tag is not set so I guess that's why I don't see the data as I expect it.

 

I also looked at the raw data with navicat. It still shows as jiberish. I was ready to assume that the data is stored ok and that both Navicat and phpmyadmin aren't showing it properly but I did one last test: I entered accented data directly in the database and showed it on the web page. To my surprise, the data that is entered and shows accented in the database shows up as gibberish on the web page. Can anyone tell me how I can ensure my data shows fine on both ends? Also, what is the proper way to enter the charset in phpmyadmin 3.1.5? Thanks for any help.

JR

Link to comment
Share on other sites

Thank you for your help. At least now I understand what's going on. I have set up the proper charset/collation on either side. I only have to do it for php. Unfortunately I am using Zend Framework, which I'm quite new at so I don't know how to specify this. I tried adding

resources.db.charset = "utf8" 

to my application.ini code but with no success. Can anyone tell me how I should go about specifying this to php? As said before I am using an appplication.ini file for configuration. Here is my (stripped from private information) application.ini

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
phpSettings.date.timezone = "EST"
resources.db.adapter = PDO_MYSQL 
resources.db.params.host = localhost 
resources.db.params.username = uphpdev 
resources.db.params.password = asdewq 
resources.db.params.dbname = test-company 
resources.db.charset = "utf8" 
resources.layout.layoutpath = APPLICATION_PATH "/layouts"
[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.