rjohnsondev / java-libpst

A library to read PST files with java, without need for external libraries.
251 stars 122 forks source link

java.io.UnsupportedEncodingException: ISO-8859-8-I #57

Open 7UpMan opened 7 years ago

7UpMan commented 7 years ago

Hi I am processing a 200,000 mail archive a somewhere between 149,000 and 150,000 I got the exception:

Unable to decode string java.io.UnsupportedEncodingException: ISO-8859-8-I at java.lang.StringCoding.decode(StringCoding.java:190) at java.lang.String.<init>(String.java:426) at java.lang.String.<init>(String.java:491) at com.pff.PSTObject.createJavaString(PSTObject.java:327) at com.pff.PSTObject.getStringItem(PSTObject.java:300) at com.pff.PSTMessage.getBodyHTML(PSTMessage.java:717) at com.s4apps.mailIndex.S4Folder.storeMessage(S4Folder.java:218) at com.s4apps.mailIndex.S4Folder.processItems(S4Folder.java:203) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:77) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at processemail.ProcessEmail.<init>(ProcessEmail.java:80) at processemail.ProcessEmail.main(ProcessEmail.java:56)

The last line of my code reads String bodyTextHtml = msg.getBodyHTML();

The program then went on to completion.

Tracking down the exact item is possible, but rather time consuming.

Thanks

PS - I use NetBeans as the IDE and it grabbed the code from Git. Version: 0.9.5-SNAPSHOT

PPS - love the library, fantastic work.

rjohnsondev commented 7 years ago

Can you check with the 0.9.4 version and see if that also exhibits the issue?

On Wed, 19 Apr 2017 at 16:05 7UpMan notifications@github.com wrote:

Hi I am processing a 200,000 mail archive a somewhere between 149,000 and 150,000 I got the exception:

Unable to decode string java.io.UnsupportedEncodingException: ISO-8859-8-I at java.lang.StringCoding.decode(StringCoding.java:190) at java.lang.String.(String.java:426) at java.lang.String.(String.java:491) at com.pff.PSTObject.createJavaString(PSTObject.java:327) at com.pff.PSTObject.getStringItem(PSTObject.java:300) at com.pff.PSTMessage.getBodyHTML(PSTMessage.java:717) at com.s4apps.mailIndex.S4Folder.storeMessage(S4Folder.java:218) at com.s4apps.mailIndex.S4Folder.processItems(S4Folder.java:203) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:77) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at processemail.ProcessEmail.(ProcessEmail.java:80) at processemail.ProcessEmail.main(ProcessEmail.java:56)

The last line of my code reads String bodyTextHtml = msg.getBodyHTML();

The program then went on to completion.

Tracking down the exact item is possible, but rather time consuming.

Thanks

PS - I use NetBeans as the IDE and it grabbed the code from Git. Version: 0.9.5-SNAPSHOT

PPS - love the library, fantastic work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rjohnsondev/java-libpst/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AATvU7kAxNBhvTQhb73J7CI69jwhYQQ5ks5rxaQVgaJpZM4NBPG1 .

7UpMan commented 7 years ago

Will do. I will run it over night and get back to you.

7UpMan commented 7 years ago

I re-ran the test as requested and all ok. I will close this issue.

Thanks.

rjohnsondev commented 7 years ago

Just checking, did the problem exist in 0.9.5-snapshot but not is 0.9.4? I ask because there was some encoding stuff changed, and it's possible a bug was introduced....

7UpMan commented 7 years ago

You are correct. Everything was fine in 0.9.4 but the exception occurred in 0.9.5-snapshot. It was 1 record out of 200,000. I was going to re-run tonight with the 0.9.5-snapshot and see if it is consistent.

Let me know if you have any other things you would like me to try.

rjohnsondev commented 7 years ago

cool, going to re-open then; it's probably a quick fix

7UpMan commented 7 years ago

I re-ran the test with 0.9.5-snapshot and it failed at the same point. 200,000 rows and 1 failure.

What would you like to do next?

rjohnsondev commented 7 years ago

Cool, that's great to know; I'll try to get a fix in place this weekend!

On Fri, 21 Apr 2017 at 15:13 7UpMan notifications@github.com wrote:

I re-ran the test with 0.9.5-snapshot and it failed at the same point. 200,000 rows and 1 failure.

What would you like to do next?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/rjohnsondev/java-libpst/issues/57#issuecomment-296069059, or mute the thread https://github.com/notifications/unsubscribe-auth/AATvUzuNlGUcq8-IP1etBTgSBndKhOWaks5ryDrcgaJpZM4NBPG1 .

7UpMan commented 7 years ago

If you are having a dig around in the code I also get a:

Can't get children for folder 2014(33570) child count: 33486 - java.lang.ArrayIndexOutOfBoundsException: 47, using alternate child tree with 33486 items

This seems to be more of a warning than an error.

I also get lots of different unknown message types which don't seem to affect anything: