Author |
Message
|
gagan.maverick |
Posted: Wed Oct 08, 2014 11:08 pm Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
thanks..
customer file is giving--- PKPKLg3E
after extracting the file is giving -- PKLg3Eßû‘é
so what do you sugest... Thanks once again |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Oct 09, 2014 12:03 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
google for 'Zip file Header'. There is lots of information out there including this one
https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html
the 'PKPK' seems a little strange to me. Find out what utility the customer is using to zip the file. (don't forget the version)
You could try stripping the first two character off the BLOB and running it through your java code.
If that works, add a simple test to your code to check for 'PKPK' in the blob and remove the first 'PK' if found. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
gagan.maverick |
Posted: Thu Oct 09, 2014 10:22 pm Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
Thanks a lot .. you suggestion worked and I have asked client as you mentioned about the utility.. But i have one more question .. After unzipping the zip in jcn ... I have one pdf file .. i need to store the name of that file as well.. coz i will need that down stream ..can you tell me how can i do that .. I mean in local env or in header somewhere in JCN.. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Oct 09, 2014 10:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I'm glad you got it working.
Java is the 'work of the devil' as far as I'm concerned. I really have no idea how to do what you want. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 10, 2014 4:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gagan.maverick wrote: |
But i have one more question .. After unzipping the zip in jcn ... I have one pdf file .. i need to store the name of that file as well.. coz i will need that down stream ..can you tell me how can i do that .. I mean in local env or in header somewhere in JCN.. |
You've already asked that question here. You're not going to get different advice asking the same question twice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gagan.maverick |
Posted: Wed May 06, 2015 1:27 am Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
Hi,
After unzipping of the files , the fresh problem which have started arriving is that in xml messages ....<?xml version="1.0" encoding="ISO-8859-1"?> when it comes out of JCN i can see that after converting it from HEX to ascii it has <?xml version="1.0" encoding="ISO-8859-1"?>?? like this in start and at the end ??. because of this i am getting xml parsing errors. |
|
Back to top |
|
 |
gagan.maverick |
Posted: Wed May 06, 2015 1:31 am Post subject: |
|
|
Acolyte
Joined: 30 Sep 2014 Posts: 50
|
And yes if it's a huge xml invoice message then some the tags in the xml gets missing for ex <Article_name>hdhdhd</Article_name> should be there but in output i am seeing /Article_name> "<" is missing.. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed May 06, 2015 2:27 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Code: |
<?xml version="1.0" encoding="ISO-8859-1"?>
|
What do you think is wrong with this?
If the data in the XML that follows is not covered in the character set ISO-8859-1 (ISO Latin-1) there is your problem.***
THE SENDER need to change their message to something like
Code: |
<?xml version="1.0" encoding="UTF-8"?>
|
*** ISO-8859-1 does not contain the Euro symbol amongst other characters
Google for ISO-8859-1 and ISO-8859-15 and see the differences. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 06, 2015 4:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
gagan.maverick wrote: |
thanks..
customer file is giving--- PKPKLg3E
after extracting the file is giving -- PKLg3Eßû‘é
so what do you sugest... Thanks once again |
The change in characters here suggests to me that you are using a BLOB (not changing the contents) but on the output you are changing the CCSID.
This will corrupt the text content as it might/will be interpreted with a different character set than the original one. Another possibility is that the original CCSID of the incoming message is just plain wrong...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|