Page 1 of 1

Encoding of symbol files

Posted: Wed 15. Nov 2023, 06:25
by bkiepke
Hi,

We have different systems where the symbol files are transfered to and read. Every time we change something we have to re-encode the files again to make them useable on windows and linux machines.

is it possible to set the default encoding of symbol files from "ANSI" or "CP1252" to "UTF-8"?

Thanks

Re: Encoding of symbol files

Posted: Wed 15. Nov 2023, 14:47
by K.Wolf
Hi,

Whether a symbols file is saved with UTF-8 encoding is determined automatically. You could add a Unicode character somewhere, such as the Comment field in Symbols properties, to force it to always be saved with UTF-8.

Re: Encoding of symbol files

Posted: Fri 8. Dec 2023, 14:29
by bkiepke
Hi,

I don't think so, because I edit a symbol file and added official CANopen vendor IDs.
UTF8_Issue.png
UTF8_Issue.png (27.67 KiB) Viewed 5844 times
UTF8_Issue_PCAN_SymbolExplorer.png
UTF8_Issue_PCAN_SymbolExplorer.png (17.7 KiB) Viewed 5844 times
At least it seems that the symbol editor can't display UTF-8 encoded characters correctly.

Any further Idea how to change the encoding...

BR
Ben

Re: Encoding of symbol files

Posted: Mon 11. Dec 2023, 10:51
by PEAK-Support
You wrote
I don't think so, because I edit a symbol file and added official CANopen vendor IDs.
But the file you shown is no Symbol File? How did you import your information into our Tools?
Did you create a own symbol file in a text Editor, or do you import a DBC ?

Keep in mind that you need to save files as UTF-8 BOM (Byte Order Mark) to be sure the UTF-8 "Header" is also written to the File.
Using the UTF-8 BOM, force to write the needed Header (3 Bytes) and so the "reader" know how to interpret the characters.
If you use for example an external Text Editor like Notepad ++, you could simply select the UTF-8 BOM Decoding and save the file.
UTF-8_BOM.png
UTF-8_BOM.png (15.92 KiB) Viewed 5358 times