• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Encoding format Error

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Team,
i have an excel sheet with some data.
i have encrypted it and saved in another excel sheet.
now to check whether the encryption is done properly,i have decrypted it and saved in another excel sheet.
But when i see the decrypted text, I see the apostrophe(') as a question mark(?).
What might be the problem?
How to solve this?
Please help ASAP.
 
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this a Java question ?
Are you encoding and saving it using java api like apache poi or similar ?
You need to provide details.


Anis Anjum wrote:
Please help ASAP.


This is frowned upon here in code ranch
 
salvin francis
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Btw, Welcome to code ranch
 
Anis Anjum
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes this is a java question.
I am using apache poi.
 
salvin francis
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, Good. We have established the fact that you are using a java api to read/write data from one sheet of excel to another.
Now, How are you encrypting it ?
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

salvin francis wrote:Okay, Good. We have established the fact that you are using a java api to read/write data from one sheet of excel to another.
Now, How are you encrypting it ?



If encrypting it reveals the hidden parts, then there is a serious problem with the encrypt/decrypt process with regards to data integrity. ;-)

We have been using apache poi lately and my guess is that it is probably apache revealing the hidden parts.

Overall apache poi ain't that bad. We found a new trick lately; just start from a word document saved by open-office to implement functionality you can't figure out like a footer that auto-increments the page number.
 
salvin francis
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What i mean is, are you using any of these methods:
https://poi.apache.org/encryption.html
 
A.J. Côté
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I guess I missed that part at first:

But when i see the decrypted text, I see the apostrophe(') as a question mark(?).



The windows apostrophe is non-standard, we usually need to replace with a straight apostrophe, like this: ' ;-)

Maybe you could make this work by configuring the right charset but I am not even sure the Windows non-standard apostrophe exists in UTF-8 or other standards. It is like a Microsoft special trademark designed to make everybody else look bad. It looks similar to the Unix backtick (`) but doesn't even use the same binary code.

Anyway, when unix systems and others don't recognize a symbol, it is standard behavior to just replace it with "?".

I would just filter all the char in the document and replace Windows crooked apostrophes with real standard straight apostrophe(') (straight, not crooked) to make apache poi happy and stop displaying question marks (?).

Again, there might be solutions to support Windows style apostrophe but I have always resorted to eliminating/converting them so far.
 
Anis Anjum
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Somebody replied as:
I agree. Here's the link: http://aspose.com/file-tools

I went into the site,it was full of a number of options.
Please provide the exact link.
 
salvin francis
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anis Anjum wrote:Hi,
Somebody replied as:
I agree. Here's the link: http://aspose.com/file-tools



That's an advertise not a reply to your post
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic