Skip to main content
Solved

XMLFragmenter Encoding


I'm having trouble using the XMLFragmente in conjunction with a HttpFetcher. The results of my httpget are correctly stored in an attribute with ISO-8859-1 encoding.

 

 

However, fragments generated by the XMLFragmenter seem to be UTF-16 encoded and I can't find a way to keep the transformer from changing the encoding.

 

 

Anyone have a good idea on how to change that?

 

 

Thanks!

Best answer by takashi

If you need to change encoding of the fragment as an XML document, the XMLFormatter might be better.
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • August 13, 2015
Hi,

 

 

The AttributeEncoder can be used to change internal encoding of attribute values.

 

But you can specify any encoding when writing the translation result into XML file even if the encoding during the processing is UTF-16, and FME will change encoding correctly at that time.

 

Why do you need to keep the encoding at the XMLFragmenter?

 

 

Takashi

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • August 13, 2015
If you need to change encoding of the fragment as an XML document, the XMLFormatter might be better.

  • Author
  • August 13, 2015
Hi,

 

thanks for your reply.

 

 

My workflow looks like this:

 

 

creator --> httpfetcher --> xmlfragmenter --> xmlflattener --> coordinatesystemsetter --> vertexcreator --> FileGeodatabaseWriter

 

 

The xml received from the fetcher is displayed correctly within the inspector. After the fragmenter, encoding problems appear in the inspector which are also present in the results I write to the FileGeodatabase. These problems are already visible within the fme-inspector, so fme doesn't seem to carry the correct encoding after the fragmenter.

 

 

Therefore, I cannot write to a any format correctly.

 

 

 

 

  • Author
  • August 13, 2015
@Takashi:

 

 

Thanks, your suggestion worked beautifully!

 

 

Inserting an XML-Formatter before the fragmenter and thus manually changing the encoding before fragmenting the xml worked nicely. I'd still consider this a workaround to the xmlfragmenter not correctly carrying the encoding but at least I can now carry on with my data.

 

 

 

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings