DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

UTF-8 support in DIAdem 15 / DIAdem 15 GIT support

Solved!
Go to solution

I am working on a DIAdem project and I use the GIT to version my files. It seems DIAdem uses defaultly UTF-16LE encoding, which makes GIT treat the files as binary. So when making commits I don't get any change logs, only that the files differ.

 

So I manually changed all the files to UTF-8. But now the DIAdem behaves strangely:

  • Some letters are not shown correctly now => e.g. '?' gets shown instead of Δ, sometimes weirder letters.
  • When I fix replace this letters in DIAdem the script runs fine and in the reports I get the correct letters.
  • When I close the file and open it afterwards, some letters get destroyed again. (‰ and ° seem to work after the first fix, Δ not)

What do I do wrong? Does DIAdem not fully support UTF-8? If not, how should I version the files using GIT and still have the file comparisons? I tried some suggestions found online, but they did not work for me.

0 Kudos
Message 1 of 4
(2,878 Views)

Hi,

 

After some research, I can present you with two possible solutions for your issue:

 

  1. It is possible to change encoding in DIAdem from Unicode to ANSI – Every character will be encoded as an ANSI character and special, non-standard characters will be replaced with “?”.
  2. Install some third party software plugin for GIT, which might allow GIT to view, read and compare files encoded in UTF-16.

 

I am also attaching illustrative instructions how to change encoding.

 

Please, let me know if the answer was helpful.

 

Best regards

FH

 

 

6B1D381D.PNG

0 Kudos
Message 2 of 4
(2,838 Views)

Sadly the provided solution (first point) did not help.

 

When I use the ANSI Diadem encoding and use the Δ sign it seems to work, but after closing and opening the file again, the Δ gets replaced by '?'.

 

0 Kudos
Message 3 of 4
(2,808 Views)
Solution
Accepted by topic author SeryDavid

Solved this problem by adding:

 

into .gitconfig:

[diff "utf16le"]
    textconv = "iconv -f UTF-16LE -t UTF-8"

 

into .gitattributes:

*.vbs diff=utf16le
*.VBS diff=utf16le

0 Kudos
Message 4 of 4
(2,797 Views)