Forum Discussion
French characters in a BASH script
I have a script that needs to store French text in some variables such as “… d’accès à distance… ”. At the BASH prompt I can type tmp="d’accès à distance" and it works. I can echo $tmp and see the correct value. If I copy that exact line and past it into a BASH script it changes to tmp="d<92>accèà istance".
I found some information that talked about changing the character set to ISO8859-1 and/or changing my terminal type but my Linux knowledge is limited. Any help would be appreciated.
Thanks
1 Reply
- Renato
Altostratus
I do not use accents in scripts or log files. All the time you will see weird symbols instead of your text depending on how copy the code (I like to copy from notepad++ directly into vi) or which editor you use, sometimes it will break the code syntax and will be harder to search patterns in your log files. If your are printing text to be shown in HTML pages, I would suggest for you to use HTML entities.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
