1,105,546 Community Members

upload xlsx into database

Member Avatar
toredor
Newbie Poster
2 posts since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,
I have a problem with the encoding of the Russian language in the transfer xlsx file into MySQL database. On the this page http://gefestholding.ru/modul/ 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.

LastMitch
Deleted Member
 
0
 

@toredor

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.

Member Avatar
diafol
Where are my eyes?
12,977 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,848 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 

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.

Member Avatar
toredor
Newbie Poster
2 posts since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
diafol
Where are my eyes?
12,977 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,848 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 
header('Content-Type: text/html; charset=utf-8');

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article