Jump to content

[SOLVED] Encoding symbols for xml


kingpin393

Recommended Posts

Hi,

 

I am pulling data from flat text files and converting them into XML files using DOM.  My problem seems to be with encoding.  A lot of the flat text files have trademark symbols, degree signs, sup characters etc.  When trying to add these to nodes in XML it seems to cause a problem.  I understand this is because XML doesn't like these characters.  I am trying to convert them using htmlentities() so that trademarks become ™ etc...  The problem is when it saves them to xml it looks like ™ - it seems when the file is saved it encodes it again.

 

I imagine this is a common issue but I could find no real help by googling it, maybe I am searching the wrong thing...

 

Any help is appreciated.

 

Thanks,

Link to comment
https://forums.phpfreaks.com/topic/127541-solved-encoding-symbols-for-xml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.