We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,688 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

upload xlsx into database

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.

3
Contributors
4
Replies
20 Hours
Discussion Span
4 Months Ago
Last Updated
6
Views
toredor
Newbie Poster
2 posts since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 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.

LastMitch
Industrious Poster
4,374 posts since Mar 2012
Reputation Points: 149
Solved Threads: 351
Skill Endorsements: 47

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.

diafol
Keep Smiling
Moderator
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,536
Skill Endorsements: 61

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

toredor
Newbie Poster
2 posts since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
header('Content-Type: text/html; charset=utf-8');

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

diafol
Keep Smiling
Moderator
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,536
Skill Endorsements: 61

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0897 seconds using 2.68MB