I'm on the task writing a function that get input string and convert it into INSERT QUERY such as
INSERT INTO MY_TABLE VALUES (some_random_production_description_here);
And the goal is: I have to keep all the original text for searching and filtering methods/queries
I spent days googling on the internet but I could not figure out this problem. I have a string contains UTF8 and special characters, and I want to insert that string into MySQL database. I tried to use HtmlEncode, UrlEncode, many other kinds of encoding but it seems I cannot GET RID of special characters like single quote (') and forward slash "\" because they are escape sequences while I want to KEEP UTF8 characters.
Everyday I got new exception cases... I know that I can write my new function and keep upgrading it, of course. But the goal I'm looking for is something stable and I'm not going to re-invent the wheel. Anyone has experience on this?