Hussein Shafie wrote:
> Benoit Maisonny wrote:
>   
>> XXE's documentation about this save option[1] is quite clear: only
>> characters "not supported by the encoding" are converted to an entity
>> reference.
>>     
>
> Except the non-breaking space character (for historical reasons, I
> guess). See
> http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xmleditapp.dialog.PreferencesEditorDialog.html#saveOptions
>
> ---
> Always save these characters as entity references
> ...
> Note
>
> There is no need to specify the non-breaking space character (nbsp = 160
> = 0xa0 = 0240) as it is always saved as " " or as " ".
> ---
>
>   
I can't believe I missed this note as it was just there on my screen :-)
Sorry for the noise!

>
>   
>> Then, why do I get Unicode character number xA0 converted to   in a
>> UTF-8 encoded document? xA0 is a supported character in UTF-8, isn't it.
>>
>> Easy workaround: I added a saveOptions/@charsSavedAsEntityRefs = false
>> to my XXE config. This still converts xA0 to   but that's better
>> for me than the entity ref.
>>     
>
>
> I can easily remove this inconsistency if you wish.
>   
Well, it doesn't harm thanks to the workaround and I guess you have more 
important items on your TODO list, so... maybe later.

 My problem was really that I don't always have the doctype present 
(because of my document being split), so I cannot have nbsp, even if XXE 
sees the DTD.



Reply via email to