{"action":"closed","issue":{"url":"https://api.github.com/repos/bizstation/transactd/issues/27","labels_url":"https://api.github.com/repos/bizstation/transactd/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/bizstation/transactd/issues/27/comments","events_url":"https://api.github.com/repos/bizstation/transactd/issues/27/events","html_url":"https://github.com/bizstation/transactd/issues/27","id":113376054,"number":27,"title":"Multibyte varchar type values are corrupted.","user":{"login":"silverist","id":10098847,"avatar_url":"https://avatars.githubusercontent.com/u/10098847?v=3","gravatar_id":"","url":"https://api.github.com/users/silverist","html_url":"https://github.com/silverist","followers_url":"https://api.github.com/users/silverist/followers","following_url":"https://api.github.com/users/silverist/following{/other_user}","gists_url":"https://api.github.com/users/silverist/gists{/gist_id}","starred_url":"https://api.github.com/users/silverist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverist/subscriptions","organizations_url":"https://api.github.com/users/silverist/orgs","repos_url":"https://api.github.com/users/silverist/repos","events_url":"https://api.github.com/users/silverist/events{/privacy}","received_events_url":"https://api.github.com/users/silverist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bizstation/transactd/labels/documentation","name":"documentation","color":"eb6420"},{"url":"https://api.github.com/repos/bizstation/transactd/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-10-26T15:06:17Z","updated_at":"2015-10-31T13:59:30Z","closed_at":"2015-10-31T13:59:30Z","body":"I insert multibyte string to varchar type column by using MultiByteToWideChar like as follows,\r\nbut the values in the DB table are corrupted.\r\nIs there another way?\r\n\r\n```C++\r\n//note is convert result value.\r\nafter_length = MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, pll.note.c_str(), -1, NULL, 0);\r\nMultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, pll.note.c_str(), -1, note, after_length);\r\n```\r\n\r\n■Table settings\r\n```\r\nDefault Referential Integrity: utf8_general_ci\r\n```\r\n\r\n```\r\n\"Variable_name\"\t            \"Value\"\r\n---------------------------------------------------------------\r\n\"character_set_client\"\t    \"utf8mb4\"\r\n\"character_set_connection\"\t\"utf8mb4\"\r\n\"character_set_database\"\t\"utf8\"\r\n\"character_set_filesystem\"\t\"binary\"\r\n\"character_set_results\"\t    \"utf8mb4\"\r\n\"character_set_server\"\t    \"utf8\"\r\n\"character_set_system\"\t    \"utf8\"\r\n\"character_sets_dir\"\t    \"C:\\Program Files\\MariaDB 10.0\\share\\charsets\\\"\r\n```"}}