3

I'm trying to set up my C application so it supports special characters such as ÄÖÜ. However, in the terminal and in my MySQL database they do not show up and are replaced with an " ?". I'm using UTF-8 for the entire db and also set the locale in my c application with

setlocale(LC_ALL, "de_DE.UTF-8");

What can I do to make my application support these characters?

If I set them manually in phpmyadmin, all seems to work.

Mu Mind
  • 10,935
  • 4
  • 38
  • 69
Frank Vilea
  • 8,323
  • 20
  • 65
  • 86

1 Answers1

1

In your terminal, while in mysql, you can run this command:

SET NAMES UTF8

Then everything should display properly in your terminal. You might need to do the same in your C application. That will set the encoding for the session.

Brent Baisley
  • 12,641
  • 2
  • 26
  • 39