You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/08/24 14:56:59 UTC

html characters in xml

I've got an xml-file that goes thru Cocoon standard xml generator to 
serialize into html (so nothing special). But using html characters as 
"&nbsp;", "&euro;" doesn't work. Anybody that has a link to the list of 
codes that can be used in this context?

Regards,
Gunter D'Hondt
SOFICO NV Belgium

Re: html characters in xml

Posted by Marc Portier <mp...@outerthought.org>.

Jorg Heymans wrote:

> i was just trying to solve a similar problem and found this webpage that 
> converts ASCII to HEX to UNICODE
> 
> http://www.mikezilla.com/exp0012.html
> 
> Just put your character in the ascii field and use the encoded unicode 
> value. For example the euro sign becomes &#8364;
> 
> The &nbsp; is a bit trickier, have you tried just doing &amp;nbsp; ? The 
> "&" is an entity reference in xml.

&#160; is what you need for &nbsp;

in general I always check the unicode.org site for special chars.
(euro has unicode point U+20AC, leading to the hex notation of the 
entity &#x20AC;)

regards,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: html characters in xml

Posted by Jorg Heymans <jh...@domek.be>.
i was just trying to solve a similar problem and found this webpage that 
converts ASCII to HEX to UNICODE

http://www.mikezilla.com/exp0012.html

Just put your character in the ascii field and use the encoded unicode 
value. For example the euro sign becomes &#8364;

The &nbsp; is a bit trickier, have you tried just doing &amp;nbsp; ? The 
"&" is an entity reference in xml.

Gunter D'Hondt wrote:

> 
> I've got an xml-file that goes thru Cocoon standard xml generator to 
> serialize into html (so nothing special). But using html characters as 
> "&nbsp;", "&euro;" doesn't work. Anybody that has a link to the list of 
> codes that can be used in this context?
> 
> Regards,
> Gunter D'Hondt
> SOFICO NV Belgium


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: html characters in xml

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Gunter D'Hondt wrote:
> 
> I've got an xml-file that goes thru Cocoon standard xml generator to 
> serialize into html (so nothing special). But using html characters as 
> "&nbsp;", "&euro;" doesn't work. Anybody that has a link to the list of 
> codes that can be used in this context?

The HTML 4 character entity reference is at
  http://www.w3.org/TR/html4/sgml/entities.html

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org