Posted on 06/08/2008 09:24:02
Sorensen wrote:
Could you please try the following:
- Export the data to an XML file
- Open the XML file in NOTEPAD
- Choose "Save as" and Choose UTF-8 in Encoding.
- Do an import of the new file
The Description is a CDATA section, right?
OK, returning to the original subject of this thread...
I have tried what you suggested.
Using a CDATA section made no difference. Of course my tags were escaped when they were not in a CDATA section, and when using a CDATA section I no longer escape them. It did not make a difference.
This is my XML:
<?xml version="1.0" encoding="utf-8" ?>
<Products>
<Product>
<ProductID>Test2348</ProductID>
<ProductLanguageID>LANG1</ProductLanguageID>
<ProductNumber>Test2348</ProductNumber>
<ProductName>Special characters test</ProductName>
<ProductLongDescription><![CDATA[Special characters test <br/>
Asian characters: 麦卡伦18年橡木威士
<br/>
Text after line break
]]></ProductLongDescription>
<ProductStock>1</ProductStock>
<ProductActive>True</ProductActive>
<ProductUnits/>
<ProductRelatedGroups/>
<ProductCustomFields/>
<ProductPrice>169</ProductPrice>
<ProductGroups>
<GroupID>GROUP1</GroupID>
</ProductGroups>
</Product>
</Products>
The problem is that the <br/> tags don't create actual line breaks. The output simply shows <br/> which is not the intention. I know that it's possible to store both these tags and Asian characters in the system because it works if you enter it into the rich text editor.
I also tried your exercise with Notepad. I'm not sure what the point was, but it also had no effect. Rest assured that I know how to deal with UTF-8 and Asian characters as that is part of my work.
Instead of suggesting more exercises could you please try to import XML with text that contains <br/> tags, and let me know how it is supposed to work with an XML example.
Thanks for your support,
Carsten
Oh, and by the way, the reference errors I mentioned occur if I don't include the following in my product XML:
<ProductUnits/>
<ProductRelatedGroups/>
<ProductCustomFields/>
This is not included when I export XML from eCom.