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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:54:21+00:00 2026-05-25T22:54:21+00:00

I have a database (Mysql) with some fields in UTF-8 (I can change that

  • 0

I have a database (Mysql) with some fields in UTF-8 (I can change that if needed).

I use an old MySQL ‘Communicator’ or its predecessor, I wrote the code ~3 years ago and all I know today is that I link with libmysql.lib and #include “mysql.h” (do tell if you want me to dig up more).

The thing is I don’t have a clue about how to insert and read non-ASCII.

I know about MultiByteToWideChar but some code compiles under Linux (gcc) so that won’t work I guess.

What is the standard procedure when it comes to getting and setting std::wstrings (or wchar_t*) from/to a MySQL database when the code should run on Linux and Windows ?

  • 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-25T22:54:22+00:00Added an answer on May 25, 2026 at 10:54 pm

    I recommend that you store your data in MySQL in UTF-8 form, rather than try to convince it to take Windows-native UTF-16. If your text is mostly Western, UTF-8 encoding will be more compact, and it will be more likely to work with the C-and-Unix nature of MySQL.

    There are Visual C++ specific examples in MySQL++ that show how to do this. See CExampleDlg::ToUTF8() and the functions that call it in examples/vstudio/mfc/mfc_dlg.cpp, for example.

    There’s a chapter in the MySQL++ user manual that gives the whys and wherefores behind all this.

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

Sidebar

Related Questions

I have some Java's serialized objects (arrays of doubles) in MySql database fields that
I have a 'price' variable that contains some integer number from a MySQL database.
I have mysql database and I want a software which can draw the database
I have a MySQL database behind a firewall which can only be accessed via
I have a MySQL database of keywords that are presently mixed-case. However, I want
I have a MySQL database that I want to archive . What is the
I have a script where I submit some fields that get entered into a
I have a form that is sending data to a MySQL database and I
I have a form that uses ajax to submit data to a mysql database,
I have a mysql database that I'm trying to populate from a text file.

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.