Я использую запрос Axios для получения XML
axios.get('http://process3.gprocurement.go.th/EPROCRssFeedWeb/egpannouncerss.xml?deptId=0304', { responseEncoding: 'Windows-874', }) .then(function (response) { // handle success console.log(response.data); }) .catch(function (error) { // handle error console.log(error); })
Таким образом, он возвращает строку в XML, но это неверно в тайском языке.
<?xml version="1.0" encoding="Windows-874" ?> <rss version="2.0"> <channel> <title>��С�ȨѴ���ͨѴ��ҧ�Ҥ�Ѱ</title> <link>http://process3.gprocurement.go.th/egp2procmainWeb/procsearch.sch?homeflag=A&proc_id=FPRO9965&servlet=FPRO9965Servlet&methodId=&announceType=2</link> <description>��С�ȨѴ���ͨѴ��ҧ�Ҥ�Ѱ����ش</description> <language>th-TH</language> <lastBuildDate>Fri, 01 Mar 2019 08:39:23 ICT</lastBuildDate> <copyright>Copyright ? 2008 All rights reserved.</copyright> <image> <title>��С�ȨѴ���ͨѴ��ҧ�Ҥ�Ѱ</title> <url>http://process3.gprocurement.go.th/EPROCRssFeedWeb/images/header_eGP1.jpg</url> <link>http://www.gprocurement.go.th</link> </image> <countbyday>0</countbyday> <item> <title>��СǴ�Ҥҫ��ͻ�Ѻ��ا����ѳ���ӹѡ�ҹ��ѧ�ѧ��Ѵ �����Ըջ�СǴ�Ҥ�����硷�ԡ�� (e-bidding)</title> <link>http://process3.gprocurement.go.th/egp2procmainWeb/jsp/procsearch.sch?servlet=gojsp&proc_id=ShowHTMLFile&processFlows=Procure&projectId=62027421499&templateType=D2&temp_Announ=A&temp_itemNo=0&seqNo=0</link> <description></description> <pubDate>2019-02-26</pubDate> <guid></guid> </item> <item> <title>��СǴ�Ҥҫ��ͻ�Ѻ��ا����ѳ���ӹѡ�ҹ��ѧ�ѧ��Ѵ �����Ըջ�СǴ�Ҥ�����硷�ԡ�� (e-bidding)</title> <link>http://process3.gprocurement.go.th/egp2procmainWeb/jsp/procsearch.sch?servlet=gojsp&proc_id=ShowHTMLFile&processFlows=Procure&projectId=62027329306&templateType=D2&temp_Announ=A&temp_itemNo=0&seqNo=0</link> <description></description> <pubDate>2019-02-25</pubDate> <guid></guid> </item> <item> <title>��СǴ�Ҥҫ���ö����â�Ҵ 12 ����� (����) ����ҵá�к͡�ٺ����ӡ��� 2,400 �ի� �����Ըջ�СǴ�Ҥ�����硷�ԡ�� (e-bidding)</title> <link>http://process3.gprocurement.go.th/egp2procmainWeb/jsp/procsearch.sch?servlet=gojsp&proc_id=ShowHTMLFile&processFlows=Procure&projectId=62027246137&templateType=D2&temp_Announ=A&temp_itemNo=0&seqNo=0</link> <description></description> <pubDate>2019-02-22</pubDate> <guid></guid> </item> </channel> </rss>
там используется декодирование windows 874.
Пожалуйста, дайте мне знать, как я могу ответить Кодирование windows-874 в Axios