utf8_encode of cyrillic characters
Closed this issue · 3 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. input cyrillic characters in the array
2. save the file as UTF-8
3. run it
What is the expected output? What do you see instead?
xls file - the text is corrupt
What version of the product are you using? On what operating system?
php-excel Version 1.0
Please provide any additional information below.
Try without utf8_encode(); I guess the strings in the array "should" be
UTF-8 and utf8_encode() is not necessary.
Original issue reported on code.google.com by Caunga...@gmail.com
on 20 Sep 2007 at 10:28
GoogleCodeExporter commented
Thanks for your input! This was definitely an error I made when first starting
out
with the library. This library can not solve all the different localization
tasks
when it comes to different character sets. I have removed the utf8_encode()
from the
code and added the option to set the global charset yourself in the branch of
version 2:
http://code.google.com/p/php-excel/source/browse/#svn/branches/version02
When invoking the library you may set a new parameter in the constructor:
$xls = new Excel_XML('ISO-8859-2');
All headers of the output document will be set accordingly. It'd be great if you
could check this with cyrillic charset - this will be difficult to test for me.
The best way, nonetheless, will be to deliver native UTF-8 in the input array ;)
Original comment by oliver.s...@gmail.com
on 10 Sep 2009 at 9:59
GoogleCodeExporter commented
I will address this issue with a new version and/or a patch for version 1.
Original comment by oliver.s...@gmail.com
on 10 Sep 2009 at 12:26
- Changed state: Accepted
GoogleCodeExporter commented
I have removed the utf8_encode from version 1.1 which is available now in the
[http://code.google.com/p/php-excel/downloads/list download section] of the
project.
Additionally you may set the desired encoding in the constructor of the file.
See the
attached readme.txt for details.
I still need to validate this with other charsets.
Original comment by oliver.s...@gmail.com
on 10 Sep 2009 at 2:22
- Changed state: Fixed