Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character encoding issues #31

Open
GoogleCodeExporter opened this issue Apr 21, 2016 · 33 comments
Open

Character encoding issues #31

GoogleCodeExporter opened this issue Apr 21, 2016 · 33 comments

Comments

@GoogleCodeExporter
Copy link

The HTML dump of the attached Excel file does not properly show either the
Russian text, or the Spanish text. 

Two issues: an htmlentities() is done in dump(), regardless of string
encoding. Attached patch uses defaultEncoding as parameter for htmlentities.

The other issue is (from reading the Excel specs @openoffice.org) that what
is called asciiEncoding in the code, is actually compressed UTF-16LE (i.e.,
all high bytes stripped). The compressed string is usually ASCII for
regular characters, but not for accented characters. In the current
version, asciiEncoding strings are not encoded to the defaultEncoding,
thereby leaving the accented characters untranslated. Attached patch
re-inserts all high byte zeros, and always call encodeUTF16.

With these patches, the attached file displays properly in HTML, and the
example.xls from the source code also still seems to work.

PS: a big thank you for this library - we've been messing with the old one
for way too long over here :-)

Original issue reported on code.google.com by [email protected] on 11 Jun 2009 at 7:02

Attachments:

@GoogleCodeExporter
Copy link
Author

This should cover issues #8, #18 and #19 as well.

Original comment by [email protected] on 11 Jun 2009 at 8:09

@GoogleCodeExporter
Copy link
Author

Hello,
Can you please explain how can i implement your patch with the original php 
excel
reader class.

Thank you

Original comment by [email protected] on 22 Jul 2009 at 2:30

@GoogleCodeExporter
Copy link
Author

Hi amouri82!
I've applied the patch for you.
See in attach.

Original comment by [email protected] on 31 Jul 2009 at 10:00

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks for the patch, worked perfectly!!

Original comment by [email protected] on 31 Jul 2009 at 10:40

@GoogleCodeExporter
Copy link
Author

Thanks for this patch, you saved me a half of a day :) (first half spent on 
working
out myself :)

Original comment by [email protected] on 18 Sep 2009 at 2:06

@GoogleCodeExporter
Copy link
Author

Man you saved my life!

<3

Original comment by [email protected] on 8 Oct 2009 at 7:47

@GoogleCodeExporter
Copy link
Author

man you saved my life!

<3

Original comment by [email protected] on 8 Oct 2009 at 7:58

@GoogleCodeExporter
Copy link
Author

This made my day! :o) thx a lot!

Original comment by [email protected] on 30 Nov 2009 at 3:04

@GoogleCodeExporter
Copy link
Author

At first, i still wondering how to convert those special char, finial i find 
your
post. Thx a lot, Great job

Original comment by [email protected] on 24 Dec 2009 at 4:55

@GoogleCodeExporter
Copy link
Author

((((
тест�     круто�

Original comment by [email protected] on 14 Jan 2010 at 8:18

@GoogleCodeExporter
Copy link
Author

Included at version 2.22 at:
http://code.google.com/p/php-excel-reader2/

Original comment by [email protected] on 19 Jan 2010 at 12:54

@GoogleCodeExporter
Copy link
Author

New PHP version not tolerated this(5.3.x):
line 917 $this->_ole =& new OLERead();

change this line
 $this->_ole = new OLERead();
And no more warning.

Original comment by [email protected] on 27 Jul 2010 at 4:47

@GoogleCodeExporter
Copy link
Author

Hi!

Thank you very much!!! It was very helpful!

Original comment by [email protected] on 8 Aug 2010 at 1:10

@GoogleCodeExporter
Copy link
Author

Thanks! A great fix.

Original comment by [email protected] on 31 Aug 2010 at 1:12

@GoogleCodeExporter
Copy link
Author

Thanks!! 

Original comment by [email protected] on 16 Sep 2010 at 11:23

@GoogleCodeExporter
Copy link
Author

Thank you man!

Original comment by [email protected] on 2 Nov 2010 at 5:10

@GoogleCodeExporter
Copy link
Author

You made my day :)

Working on this all day long, and finally just before going home : this Post.

Thanks!!!

Original comment by [email protected] on 9 Nov 2010 at 3:55

@GoogleCodeExporter
Copy link
Author

Oh! Thanks a lot!
Все отлично работает!!! =)

Original comment by [email protected] on 19 Nov 2010 at 5:51

@GoogleCodeExporter
Copy link
Author

Thanks Mann :)
This works ;)

Original comment by [email protected] on 4 Mar 2011 at 4:13

@GoogleCodeExporter
Copy link
Author

Thanks for this patch, worked smooth jus by replacind the downloaded file.

Original comment by [email protected] on 22 May 2011 at 2:11

@GoogleCodeExporter
Copy link
Author

Thanks for this patch, it works perfectly :)

Original comment by [email protected] on 1 Aug 2011 at 6:50

@GoogleCodeExporter
Copy link
Author

Thanks for this patch, it works Turkish characters to.

Original comment by [email protected] on 9 Sep 2011 at 11:30

@GoogleCodeExporter
Copy link
Author

THANK YOU (I normally don't type in CAPS, but after hours trying everything in 
the book, I finally found this..)

Original comment by [email protected] on 28 Sep 2011 at 4:21

@GoogleCodeExporter
Copy link
Author

Just find a line:

$val = htmlentities($val);

and replace it with:

$val = htmlentities($val, ENT_COMPAT, $this->_defaultEncoding);

This corrects the encoding using dump() method, as the val() seems to be 
working fine. Make sure to use setOutputEncoding() or define encoding when 
constructing the class

Original comment by [email protected] on 19 Jan 2012 at 11:49

@GoogleCodeExporter
Copy link
Author

God bless you for this patch! :)

Original comment by [email protected] on 29 Mar 2012 at 6:14

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

hi
    i have test with below specifications.

    PHP: 5.2.9
    Version 1.7.1

PHP Version 5.2.9

System  Windows NT SYSTEM10 5.1 build 2600

Original comment by [email protected] on 21 Jun 2012 at 5:10

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Thanks. you saved my job. I think it's time to change the split function to 
explode, because it has been  DEPRECATED.

Original comment by [email protected] on 3 Aug 2012 at 12:54

@GoogleCodeExporter
Copy link
Author

Sorry, but i have error. 
May be you say why?
upload new file and have "Fatal error: Call to undefined method 
Spreadsheet_Excel_Reader::dump_clean() in 
/var/www/vhosts/u1912784........./plugins/excel-to-table/excel-2-table.php on 
line 19"

help! 

Original comment by [email protected] on 10 Apr 2013 at 2:20

@GoogleCodeExporter
Copy link
Author

the fix for issue #31 helped big time. thanks!

Original comment by [email protected] on 26 Apr 2013 at 6:27

@GoogleCodeExporter
Copy link
Author

thank a lot

Original comment by [email protected] on 21 Aug 2014 at 6:06

@GoogleCodeExporter
Copy link
Author

i'm still error 
my output error : Trung tâm Viá»…n thông IP

Original comment by [email protected] on 3 Mar 2015 at 10:00

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant