I am producing a user guide for software. In preparation for its translation into various languages, I envisaged using variables for menu items (like Background or Check for software updates).
These variables would be imported from a .txt file, itself based on an Excel sheet concatenating a variable name and value, respecting the following syntax:
BACKGROUND=Arrière-plan
CHECK FOR SOFTWARE UPDATES=Rechercher les mises à jour logicielles
After importing the .txt file, these two variables appear in the list of text variables as:
BACKGROUND=Arrière-plan
CHECK FOR SOFTWARE UPDATES=Rechercher les mises à jour logicielles
Even if I restore the French accents one by one, I feel uneasy using this method for languages that I would not know how to correct.
Is there any way to more reliably import values with accents?
Importing variables with values containing accents
Moderators: Alexander Halser, Tim Green
-
- Posts: 11
- Joined: Thu Mar 24, 2022 2:40 pm
- Tim Green
- Site Admin
- Posts: 23184
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Importing variables with values containing accents
Hi Tom,
You probably imported an ANSI-encoded text file instead of UTF-8. Use an editor that lets you check and convert the text encoding, like the free Notepad++ and that will fix it.
You probably imported an ANSI-encoded text file instead of UTF-8. Use an editor that lets you check and convert the text encoding, like the free Notepad++ and that will fix it.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 11
- Joined: Thu Mar 24, 2022 2:40 pm
Re: Importing variables with values containing accents
I can confirm that by saving the file in UTF-8 format (or converting it to this format) enables accents to be correctly imported.
-
- Posts: 2
- Joined: Tue Jan 26, 2021 2:22 pm
Re: Importing variables with values containing accents
I have the same kind of problem. When I publish a project in Finnish as a PDF, the characters "ä" and "ö" appear correctly in the main text. However, the characters originating from a variable in an external file appear unreadable. The variable file was originally ASCII-encoded so I converted it to UTF-8 but it did not help. I even re-created the file from scratch in UTF-8 without success. What to do?
Re: Importing variables with values containing accents
Does your UTF-8 file start with a byte order mark (BOM)? You might find it works with one, if not. If converting in NotePad++ both options are offered.
-
- Posts: 2
- Joined: Tue Jan 26, 2021 2:22 pm
Re: Importing variables with values containing accents
BOM did the trick. Thanks!
-
- Posts: 11
- Joined: Thu Mar 24, 2022 2:40 pm
Re: Importing variables with values containing accents
I can also confirm that selecting UTF-8 BOM encoding in Notepad++ ensured that the imported variables were displayed correctly.
Thanks for your help.
Thanks for your help.