Start New Discussion within our Web Development Community

I have a problem with the encoding of the Russian language in the transfer xlsx file into MySQL database. On the this page you can see my efforts. Can anyone advise me how to set encoding? To convert using php class (SimpleXLSX.class). Thank you for your answer.


upload xlsx into database

Since you didn' provide any code regarding how you insert your data. I assume you didn't set the entire MySQL database character-set to UTF-8? On your form when you submit the data make sure the encoding is UTF-8, by setting Content-Type to text/html; charset=utf-8.

If your xlsx handling script does not have html (I'm assuming it doesn't) - then you won't be using a meta tag for the charset, so use the header() to set it.

I have a whole database set to utf-8, but the problem with encoding when reading data from a xlsx file that contains Russian language.
Can you please show me how to set the function header ()? Thank you

header('Content-Type: text/html; charset=utf-8');

As mentioned by LastMitch. Google'd give you that.

This article has been dead for over six months. Start a new discussion instead.