Why the character " Õ " displays "�" when passed in commandline ?
Issue
- Need little assistance as explained below :
- Here is a command that I can run at a Linux prompt, and it all works fine!!!
$ test.sh -t Õ
- The same command in a .sh file works, but the 'Õ' character is not interpreted properly. The results of each are as follows:
- When submitting at the command line, the output looks like this....
2016-05-16 15:44:22 - Argument Received - t: Õ
- When submitting with the above command in a .sh file, the output looks like this....
2016-05-16 15:38:37 - Argument Received - t �
- Thus, when executing the script, the character is getting converted. The character is represented as an octal '325', hex 'd5', decimal '213'. We are trying to use this character as a delimiter in this process.
- Any recommendations?
Environment
Red Hat Enterprise Linux 6.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.