Hello everyone,
i noticed that AS saves tasks written in LAD as an XML file which can be edited by any text editor. That sparked the idea that i might be able to generate some repetitive networks by using python to generate the XML from a list of tag names and comments which i have availabe inside of an excel file anyway (customer requires the program to be written in LAD). My python script worked alright, and the resulting XML was parsed correctly by AS.
Now my issue arises from umlauts in the comments (Ă€, ö, ĂŒ). Those are not represented in the ASCII character set. No big issue as i just encode my XML as UTF-8.
Opening any LAD task with Notepad++ also says that its encoded as UTF-8, yet still opening the file in the LAD editor doesnt render these Umlauts correctly.
Here is what i mean:
Example network, viewed by opening the LAD task in Notepad++:
<network label="" comment="ABL Ventilatoren 13-18 Freigabe
Weitergabe der Einzelstörungen an Sammelstörung der Anlage" row="2" column="0" commented="0">
<row>
<contact type="open" name="W_71520DAB_11L014ABFU6YSAR.AlMk"/>
<line/>
<line/>
<coil type="set" name="L014_SST"/>
</row>
<row>
<contact type="open" name="W_71520DAB_11L014VEM06YSAG.AlMk" or="true"/>
<empty/>
<empty/>
<empty/>
</row>
</network>
Network comment, viewed inside the LAD editor:
ABL Ventilatoren 13-18 Freigabe
Weitergabe der Einzelstörungen an Sammelstörung der Anlage
How can i fix this? When i enter Umlauts manually in the Network comment inside the LAD editor, they get rendered correctly.
As always, thanks in advance!