You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Milosh Milosavljevic <mi...@emisia.net> on 2005/12/06 20:12:36 UTC

[commons-lang] Xml escaping

Hi,
  I am not sure why StringEscapeUtils.escapeXml always tries to escape 
high ascii characters together with xml entities. In case that this is 
just an issue connected to HTML escaping, I would suggest to make a flag 
for high ascii escaping. I did that flag in my local branch of 
commons-lang and I can send it to you if there is a need.

  Thanks,
  Milosh

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-lang] Xml escaping

Posted by Milosh Milosavljevic <mi...@emisia.net>.
Catalin Grigoroscuta wrote:

> Hi,
>
> IMHO this is not an issue of breaking a specification, it's an issue 
> of XML readability.
> One of the main reasons we use XML in the first place it's because it 
> is human readable - otherwise, we would be using something like ASN.1 
> instead.
> I think that escaping high ascii characters makes the XML unreadable. 
> For example, imagine an XML written in French (they even use accent 
> characters in tag names, I've seen it) - escaping them would look 
> really unfriendly to a French guy.
>
> Regards,
> Catalin
>
> Milosh Milosavljevic wrote:
>
>>
>>    Hi,
>> I do not have really a specification link. It  is more of a googling 
>> around and finding lots of articles, which addresses the xml escaping 
>> issue. I didn't come across a need for escaping high-ascii 
>> characters. Only specific xml entities. I am not really sure if there 
>> is an actual need for escaping high ascii characters. If encoding 
>> flag is properly set in input or output stream for xml parser I do 
>> not see the cause for issues if those characters are left as they were.
>>
>> In case that you actully have a specification link stating the need 
>> for escaping of high ascii characters I would be more than happy to 
>> change my source code to comply with that specification.
>>
>>    Thanks a lot for the quick reply,
>>    Milosh
>>
>> Stephen Colebourne wrote:
>>
>>> Have you got a specification link that you believe we are breaking?
>>>
>>> Stephen
>>>
>>>
>>> Milosh Milosavljevic wrote:
>>>
>>>> Hi,
>>>>  I am not sure why StringEscapeUtils.escapeXml always tries to 
>>>> escape high ascii characters together with xml entities. In case 
>>>> that this is just an issue connected to HTML escaping, I would 
>>>> suggest to make a flag for high ascii escaping. I did that flag in 
>>>> my local branch of commons-lang and I can send it to you if there 
>>>> is a need.
>>>>
>>>>  Thanks,
>>>>  Milosh
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-lang] Xml escaping

Posted by Milosh Milosavljevic <mi...@emisia.net>.
I agree with Catalin.My daily work is in terminology and translation 
field. I am seeing tons of "weird" characters and encodings on a daily 
basis. I never had a need to escape high asciis if I use proper encoding 
on my streams.

It would be very handy to hear real reasons behind high ascii escaping.

Milosh

Catalin Grigoroscuta wrote:

> Hi,
>
> IMHO this is not an issue of breaking a specification, it's an issue 
> of XML readability.
> One of the main reasons we use XML in the first place it's because it 
> is human readable - otherwise, we would be using something like ASN.1 
> instead.
> I think that escaping high ascii characters makes the XML unreadable. 
> For example, imagine an XML written in French (they even use accent 
> characters in tag names, I've seen it) - escaping them would look 
> really unfriendly to a French guy.
>
> Regards,
> Catalin
>
> Milosh Milosavljevic wrote:
>
>>
>>    Hi,
>> I do not have really a specification link. It  is more of a googling 
>> around and finding lots of articles, which addresses the xml escaping 
>> issue. I didn't come across a need for escaping high-ascii 
>> characters. Only specific xml entities. I am not really sure if there 
>> is an actual need for escaping high ascii characters. If encoding 
>> flag is properly set in input or output stream for xml parser I do 
>> not see the cause for issues if those characters are left as they were.
>>
>> In case that you actully have a specification link stating the need 
>> for escaping of high ascii characters I would be more than happy to 
>> change my source code to comply with that specification.
>>
>>    Thanks a lot for the quick reply,
>>    Milosh
>>
>> Stephen Colebourne wrote:
>>
>>> Have you got a specification link that you believe we are breaking?
>>>
>>> Stephen
>>>
>>>
>>> Milosh Milosavljevic wrote:
>>>
>>>> Hi,
>>>>  I am not sure why StringEscapeUtils.escapeXml always tries to 
>>>> escape high ascii characters together with xml entities. In case 
>>>> that this is just an issue connected to HTML escaping, I would 
>>>> suggest to make a flag for high ascii escaping. I did that flag in 
>>>> my local branch of commons-lang and I can send it to you if there 
>>>> is a need.
>>>>
>>>>  Thanks,
>>>>  Milosh
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-lang] Xml escaping

Posted by Catalin Grigoroscuta <c....@moodmedia.ro>.
Hi,

IMHO this is not an issue of breaking a specification, it's an issue of 
XML readability.
One of the main reasons we use XML in the first place it's because it is 
human readable - otherwise, we would be using something like ASN.1 instead.
I think that escaping high ascii characters makes the XML unreadable. 
For example, imagine an XML written in French (they even use accent 
characters in tag names, I've seen it) - escaping them would look really 
unfriendly to a French guy.

Regards,
Catalin

Milosh Milosavljevic wrote:

>
>    Hi,
> I do not have really a specification link. It  is more of a googling 
> around and finding lots of articles, which addresses the xml escaping 
> issue. I didn't come across a need for escaping high-ascii characters. 
> Only specific xml entities. I am not really sure if there is an actual 
> need for escaping high ascii characters. If encoding flag is properly 
> set in input or output stream for xml parser I do not see the cause 
> for issues if those characters are left as they were.
>
> In case that you actully have a specification link stating the need 
> for escaping of high ascii characters I would be more than happy to 
> change my source code to comply with that specification.
>
>    Thanks a lot for the quick reply,
>    Milosh
>
> Stephen Colebourne wrote:
>
>> Have you got a specification link that you believe we are breaking?
>>
>> Stephen
>>
>>
>> Milosh Milosavljevic wrote:
>>
>>> Hi,
>>>  I am not sure why StringEscapeUtils.escapeXml always tries to 
>>> escape high ascii characters together with xml entities. In case 
>>> that this is just an issue connected to HTML escaping, I would 
>>> suggest to make a flag for high ascii escaping. I did that flag in 
>>> my local branch of commons-lang and I can send it to you if there is 
>>> a need.
>>>
>>>  Thanks,
>>>  Milosh
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-lang] Xml escaping

Posted by Milosh Milosavljevic <mi...@emisia.net>.
    Hi,
I do not have really a specification link. It  is more of a googling 
around and finding lots of articles, which addresses the xml escaping 
issue. I didn't come across a need for escaping high-ascii characters. 
Only specific xml entities. I am not really sure if there is an actual 
need for escaping high ascii characters. If encoding flag is properly 
set in input or output stream for xml parser I do not see the cause for 
issues if those characters are left as they were.

In case that you actully have a specification link stating the need for 
escaping of high ascii characters I would be more than happy to change 
my source code to comply with that specification.

    Thanks a lot for the quick reply,
    Milosh

Stephen Colebourne wrote:

> Have you got a specification link that you believe we are breaking?
>
> Stephen
>
>
> Milosh Milosavljevic wrote:
>
>> Hi,
>>  I am not sure why StringEscapeUtils.escapeXml always tries to escape 
>> high ascii characters together with xml entities. In case that this 
>> is just an issue connected to HTML escaping, I would suggest to make 
>> a flag for high ascii escaping. I did that flag in my local branch of 
>> commons-lang and I can send it to you if there is a need.
>>
>>  Thanks,
>>  Milosh
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-lang] Xml escaping

Posted by Stephen Colebourne <sc...@btopenworld.com>.
Have you got a specification link that you believe we are breaking?

Stephen


Milosh Milosavljevic wrote:
> Hi,
>  I am not sure why StringEscapeUtils.escapeXml always tries to escape 
> high ascii characters together with xml entities. In case that this is 
> just an issue connected to HTML escaping, I would suggest to make a flag 
> for high ascii escaping. I did that flag in my local branch of 
> commons-lang and I can send it to you if there is a need.
> 
>  Thanks,
>  Milosh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org