Hello, i need one small help with charset selection in mysql.data when i make app in C++/CLI. I have one form where i can select "banned player" from dropdown and then program write text into textboxes from mysql where i can edit and when i press bottom button, then program upload changes to mysql, everything works, but charset is broken. Can someone help me how to solve this? I try to add in querystring on front "SET NAMES \'utf8\'; SET CHARACTER SET utf8; UPDATE...." but not work. Here is picture with problem http://prntscr.com/b1rei8
Thanks for reply. I try it but not work, but i see problem is in program, because program sending broken charset into mysql, i make wrong syntax to see what i sending, and i see this, look: http://prntscr.com/b1rxks
Problem solved easily.
Im doing 2 step conversion at code on top, string buffer for mysql syntax and then conver string to String^ (and this is a problem where chars get broken to ?). easy fix is, do String^ buffer with clear text like "UPDATE ...." + ipAdresa, and now you get correct unicode :)
Well done.
BTW. It's easier to build your query string with String::Format. Also you don't need the std::string since the MySql classes are .NET and expect a String^.