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 6891857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:27:45+00:00 2026-05-27T06:27:45+00:00

I m loading an external xml file . I m getting some node values,output

  • 0

I m loading an external xml file .

I m getting some node values,output em in html as a select form and save these plus a text input by the user into mysql.

The characters inserted to mysql are greek.

I use the utf8 meta in my html head, the “SET NAMES utf-8” after my sql connection in php,utf-8 encoding in my notpad++ editor and also utf-8_general_ci in my table.Note here that when dtbs was created collation was latin and i manually changed it to utf8.Everything is passed correctly to mysql.

Till now i had a function that was generating an xml according to my selection.The xml’s node names and values where equal to the mysql query.Works perfect for english chars but when it comes to greek i get only question marks(“?”) printed. Also, i have already included the utf8 option to the new domdocument call.

Any idea on what should i do to get the greek characters on my xml?
Thanks in advance.

  • 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-27T06:27:46+00:00Added an answer on May 27, 2026 at 6:27 am

    Solution:

    require("db.php");//Holds the connect info
    
    $sql = mysql_connect($hostname , $username , $password)
    **mysql_set_charset('utf8',$sql);**
    $dtbs = mysql_select_db("hyb",$sql);
    

    mysql_set_charset did the work.
    I missed the difference between collation and charset witch is defined here:

    A character set is a set of symbols and encodings. A collation is a set of rules for comparing characters in a character set. Let’s make the distinction clear with an example of an imaginary character set.

    Suppose that we have an alphabet with four letters: “A”, “B”, “a”, “b”. We give each letter a number: “A” = 0, “B” = 1, “a” = 2, “b” = 3. The letter “A” is a symbol, the number 0 is the encoding for “A”, and the combination of all four letters and their encodings is a character set.

    Character Sets and Collations in General

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

Sidebar

Related Questions

I am successfully loading via AJAX some svg from external file: $(#svg).load(svgUrl + svg,
I have an external xml file that I am loading in my views.py file
i'm loading, using the JQuery ajax() method, an external page with both html and
I am trying to load an external site instead of the internal index.html file
I am trying to select specific values from a xml document using XPath. The
I am trying to select specific values from a xml document using XPath. The
I'm getting some weird results while parsing some XML in JavaScript. I have the
Loading an external php file with jquery is actually easy. I simply use the
I am loading a HTML from an external server. The HTML markup has UTF-8
I am using jQuery load, to load some data from an external file like

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.