Archive: xml version="1.0" encoding="UTF-16" problem


xml version="1.0" encoding="UTF-16" problem
I have got a problem reading/writing an .xml file !

I have tried several different xml plugins, and non seemed to work for this specific file !

<?xml version="1.0" encoding="UTF-16" ?>
- <playlists playlists="3">
<playlist filename="plfB9B0.m3u8" title="Local" id="{7C8E5F0C-3DE5-4605-B32C-395897BDB023}" songs="75" seconds="20" />
<playlist filename="plfEBCC.m3u8" title="Doors" id="{AA975345-5DC3-495B-88D3-7F320513AB0E}" songs="30" seconds="7" />
<playlist filename="plf2ED0.m3u8" title="Jethro Tull" id="{F1A8A6C4-7259-40C2-AF88-57647537FE4A}" songs="12" seconds="2" />
</playlists>

Does anybody know how to handle this ?

Thanx


I tried using the XML plugin (http://nsis.sourceforge.net/XML_plug-in) to read the file you attached. The ${xml::LoadFile} command returned an error when I tried to use your XML file with a script compiled using NSIS 2.45 and version 2.0 of the XML plugin.

The problem is the format in which the file has been saved. According to my text editor the file is in "UCS-2 Little Endian" format.

The plugin's documentation mentions "Unicode UTF-8 support" so I used my text editor to save the file in a new format (UTF-8) and my script was then able to load and read the file.


Thanx for reply.
This is a xml file used by Winamp, and winamp wants it to be in utf-16 format.

For the moment I am using some NSIS code which reads and writes it byte by byte, which works some how.

Other I am/was just hoping there would be a proper plugin for the utf-16 format ?


There is a Unicode version of NSIS available from http://www.scratchpaper.com which is discussed in this very long topic (currently up to 9 pages) at http://forums.winamp.com/showthread.php?threadid=277381

There are a few plugins which support Unicode and Anders has written this plugin which he described as "very much in the testing stage": http://nsis.sourceforge.net/CallAnsiPlugin_plug-in