[xml] Char Refs in ISO-8859-1



I’ve got an app generating XML that looks like this excerpt:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<LAST_NAME>D*ROCH*R</LAST_NAME>

 

Where, because of problems pasting non-ascii into emails, I’ve rpresented two characters here as asterisks, but in the actual XML they are 0xe8, an accented lower-case ‘e’.

 

This seems correct to me. However the app that receives this data screws up the accented characters UNLESS I’ve tweaked the data to use ‘&#xe8;’ instead.

 

Now, I believe it shouldn’t, in a perfect world, be necessary to do that, but it appears to nevertheless be necessary in this case.

 

My question is: While leaving the declaration of ISO-8859-1 in the xml header, is there any way to get libxml2 to automatically output such symbols as CharRefs instead of the actual Unicode code point? Is my only other choice to output it as ASCII instead? (that would be a really gross “solution”.)

 

Thanks!

 

Fred Smith

Senior Applications Programmer/Analyst

Computrition, Inc.

fred computrition com

781-275-4488x148

 

 

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error, please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]