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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:39:23+00:00 2026-05-29T05:39:23+00:00

I have create a DB and i use Mysqldb. I want to insert and

  • 0

I have create a DB and i use Mysqldb.
I want to insert and select data chars type, and that chars are in greek language.
I have set the collation of my database in utf-8_general_ci but, when i insert a greek word i see something strange characters, then i try to select via python the rows of this table and the result is this (1,??????).

Can anyone help me please?Thanks

  • 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-29T05:39:24+00:00Added an answer on May 29, 2026 at 5:39 am

    There’s a problem with your encoding possibly, make sure to set utf8 in python, and try to set the db:

    set character_set_database = utf8;
    set character_set_server = utf8;
    set character_set_system = utf8;
    set collation_database = utf8_general_ci;
    set collation_server = utf8_general_ci;
    set names utf8;
    

    Or using a Greek character set 🙂

    Python:

    db = MySQLdb.connect(host="localhost",
    use_unicode = True, charset = "utf8",
    user=username, passwd=password, db=database)
    

    Then to output, you need to specify the string is Unicode:

    print (yourStringFromDatabase).encode("iso-8859-1")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have information stored in a database that I want to use to create
I have a create action in the controller that I use for a form
Good day, I have a library project that i use to create a paid
I have this piece of XML that I use in order to create a
i have this crazy label for each time i create a migration that use
I want to use MySQLdb to create a parameterized query such as: serials =
I create a panel in wxpython, plus i have a database(MySQLdb), then i select
I use TcxGrid I have create fields on execution time because I have a
I have create name range on sheet A so I need to use this
Recently I have asked a question about what I should use to create self-contained

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.