我的Windows 7 Pro是英文版, 但系統位置是Taiwan, 使用的格式是Chinese (Traditional, Taiwan), 在"Region and Language"中的設定, 在Visual Studio Community 2017寫C++與MariaDB/MySQL insert中文出現亂碼.
在Visual Studio中的設定為:
在MariaDB/MySQL的設定為:
MariaDB [file_index]> show variables like "character_set%";
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+