XML utf-8

XML utf-8

In a project i read some information from a xml file with zenon logic.
I haven't got problem.

I need to translate my project in chiness, and i have some problem with convertion.

this my xml file
0-与PLC连接不工作@GENERALQiyu¡n : PLC不工作\n网络故障\nJie : 检查PCL供电\n检查网络布线\n检查HMI网络配置C:\GCX\ROBOACCESS\RT\FILES\zenon\custom\additional\GCX\DOC\ALARMS\ZH\0.html1


when i read the TITLE i have in return in a string:

0-与PLC¨Â¿Å¾¦Å½Â¥ä¸¥Â·Â¥ä½œ


this is my zenon code
XMLS := _APP_FOLDER + 'RT\FILES\zenon\custom\additional\GCX\DOC\ALARMS\' + sys_lang_initial + '\ALARM_ID_' + RIGHT(_SelectedObjectId, len(_SelectedObjectId) -1 ) + '.xml';
hTag2 := XmlParseDocFile(XMLS);
//(hTag2);
xmllasterrord := XmlLastError();
xml_tag_parent := XmlGetParent( hTag2 );
xmllasterrord := XmlLastError();
xml_hchild_tag := XmlFirstChild(hTag2,'');
xmllasterrord := XmlLastError();
tt := XmlGetTagName(xml_hchild_tag);
//title
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_DESC_TITLES := TTT;
//MODULE
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_DESC_SUBTITLES := TTT;
//DIAGNOSIS
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_DESC_DIAGNOSIS := TTT;
//TIMELEFT
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_DESC_TIMELEFT := TTT;
//DOC
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_OPL_PATH := TTT;
//MEDIA
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_MEDIA_PATH := TTT;
//OCCURENCE
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
// ALARM_DESC_TITLES := TTT;
//MODULE
xml_hchild_tag := XmlNextChild(hTag2,xml_hchild_tag,'');
XmlGetTagCont(xml_hchild_tag,TTT);
ALARM_DESC_MODULE_NUM := any_to_int(TTT);
XmlFreeDoc( hTag2 );



They have a solution?




This is a migrated post! Originally posted on 06.03.2019 by user johanngrimaud. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com