I have a unix script which calls java jar and gives some encrypted text (doesn't have any special character) as input. Java code decrypts it and then sends the decrypted message to database.
But sometimes special characters (à,ē) are given as inputs. So they are encrypted and sent to jar file. So far so good, but when we print the decrypted message,the spl characters are getting converted to question marks. I tried printing some special characters directly. They are also getting converted to question marks when I ran the Unix script manually. Output is junk characters instead of question marks or special characters.
When I try to put some logs like this
LOGGER.info("áéróspåcê")
it is getting converted to ??r?sp?c? when the script is running through crontab whereas
"áéróspåcê" is getting converted to áéróspÃ¥cê when I trigger the script manually.