How do I preserve a UTF8 character set when doing an update into MySQL, from a Google Sheet?

49
January 13, 2019, at 03:30 AM

I have an app to upload a spreadsheet into my MySQL database. Some of the fields contain Unicode characters from Northwest Indian languages. Example:

syəhúm tə nsná. nəsʔúŋəsteŋ c' cə yaʔ ʔaʔ kʷɬi čná ʔaʔ či himʔuyíca.

After the update, the MySQL table contains this:

sy?húm t? nsná. n?s?ú??ste? c` c? ya? ?a? k??i ?ná ?a? ?i him?uyíca.

If I enter the original directly into MySQL using MySQLAdmin or a similar tool, I have no such trouble, and doing a query to download the record back into google sheets is also successful. It is just the upload that gives me fits.

Here is (more or less) the code snippet that pulls the cell into the update query:

var itm = sheet.getRange(rnum, 4).getValue();
var sql = "UPDATE dbo_accounts ";
sql += "SET item = '" + item + " ";
sql += "WHERE  history_id = " + hid;
SQLStatementE.executeUpdate(sql);
READ ALSO
In C Language, store MySQL row data as variable to avoid segmentation fault with RPi/GPIO stuffs

In C Language, store MySQL row data as variable to avoid segmentation fault with RPi/GPIO stuffs

This is most-likely a stupid beginners questionFor starters, here's my C code [segment]:

49
How to update FK linked to multiple table - Cascade on Update

How to update FK linked to multiple table - Cascade on Update

I have 3 tables which are linked to each other

68
How do I convert a JSON object into a MySQL row?

How do I convert a JSON object into a MySQL row?

I'd like to take a JSON string representing an object from a 3rd party API and insert it into a MySQL tableThe JSON object properties match the table fields 1-to-1

61
How to substantially decrease mySQL query processing time?

How to substantially decrease mySQL query processing time?

I have a trouble that my query in mySQL is being processing about 8-10 minutes before report finally appearsI have created few indexes and time has fallen till 2-3 minutes

30