[ome-users] wrong encoding returned by dumpXML
Stephen D. Van Hooser
vanhoosr at brandeis.edu
Tue Oct 16 17:49:17 BST 2018
Hi all -
I'm new to the Open Microscopy effort but it looks really nice, thank you.
It's always dangerous to post a bug as one's first message, but I think there's a bug in dumpXML. I'm using Matlab, but it tells me that the object is loci.formats.ome.OMEXMLMetadataImpl
If I call
r = bfGetReader('~/Downloads/myfile.lif');
m=r.getMetadataStore();
x = char(m.dumpXML()); % char converts Java string to Matlab character string
str2text('myfilename.xml',x); % my own function that simply writes text files https://github.com/VH-Lab/vhlab-toolbox-matlab.git
s = xml2struct('myfilename.xml')
I get a fatal error because the encoding type described in opening of the xml string in x is UTF-8 but the actual encoding of the document is iso-8859-1. If I edit the x string manually, it can be processed correctly.
Best
Steve
------------------------------------------
Stephen D. Van Hooser, PhD
Associate Professor of Biology
Brandeis University
781-736-2721 (phone)
{www <http://www.vhlab.org/>,wiki <http://wiki.vhlab.org/>,code <http://code.vhlab.org/>,dataclass <http://dataclass.vhlab.org/>,twitter <https://twitter.com/VanHooserLab/>}.vhlab.org <http://vhlab.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20181016/fc2e6264/attachment.html>
More information about the ome-users
mailing list