I have this MySQL table in production that is of charset latin1_swedish_ci ( aka latin1 ) .
Right now, there is this incoming content( String : "\ud55c\ubc24\uc758" ) in a UTF-8 format that needs to be inserted into this TEXT column field called keywords in the table.
When I try to perform the INSERT, I get this error :
Incorrect string value: '\xED\x95\x9C\xEB\xB0\xA4...' for column 'keywords' at row 1
I have tried all kinds of ways in my Java code to try to convert from UTF8 to ISO-8859-1 like this below and I am still getting the same error :
String convertedString = new String(originalString.getBytes("UTF-8"), "ISO-8859-1");
I know there are solutions on StackOverflow that mentions to change the charset of the MySQL table to UTF8 from latin1, and I unfortunately cannot do that because this is a live production MySQL master server and also it has historically been using latin1.
Does anyone have any suggestions to fix this "Incorrect string value" error?
Thanks IS