Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6840177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:48:35+00:00 2026-05-26T23:48:35+00:00

I’m using WAMP server. I have my php.ini set to utf-8 and also I

  • 0

I’m using WAMP server. I have my php.ini set to utf-8 and also I have
header('Content-Type: text/xml; charset=utf-8'); in my php and
@mysql_query("SET NAMES utf8"); in my connection file.

MySQL collation is set to utf8_turkish_ci and when I write my queries directly from phpMyAdmin the Turkish characters ç,ş,ö,ğ etc. show properly. But when I try to submit them from a php form, they turn into strange characters on the database, however when I write them again with php, they show properly.

My problem is, when I enter queries directly from phpMyAdmin, they don’t show properly in PHP, and the vice versa, when I enter them from PHP they don’t show properly in the database. How can I fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:48:36+00:00Added an answer on May 26, 2026 at 11:48 pm

    Your data is being correctly stored in the database when you write the files using your script. The proof of this is that they come out correct when you echo back out the data. If you do not see the data correctly formatted in your phpmyadmin, it means that the page isn’t properly set up to display utf-8.

    The easiest way to check is to Ctrl+U to view the source code of your phpmyadmin and look for:

      < meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    

    It should also display:

    MySQL charset: UTF-8 Unicode (utf8)
    MySQL connection collation:    utf8_unicode_ci
    

    On the very first page when you open phpMyAdmin. If you do not see both of these, then follow these steps to fix it:

    A) Immediate solution I could think of is changing or forcing the browser’s character encoding into utf-8. In Mozilla Firefox, it can be set via View -> Character Encoding -> Unicode (UTF-8)

    or B) Another elegant solution might be changing the phpMyAdmin configurations so that it sends and sets proper charset in Content-Type header as Content-Type: text/html; charset=utf-8 . To do this, we have to edit the config.inc.php file found at phpMyAdmin’s root directory:

    $cfg['DefaultCharset'] = 'utf-8'; and 
    $cfg['AllowAnywhereRecoding'] = true; 
    

    These change of configurations should send proper headers. Anyhow, if the lang cookie is already set to some other charset, it won’t reflect the changes. So, one may need to clear the cookies to see the changes.

    Credit for above solutions: http://rajeshanbiah.blogspot.com/2004/12/storing-unicode-texts-in-mysql-with.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.