You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Peter C. Verhage" <pe...@zeelandnet.nl> on 2001/03/13 23:27:38 UTC

€ (€) :(

I've specified the euro entity in a DTD which I use within my XML page and
within my stylesheet. I also have some other special characters defined in
this DTD like &copy; etc.

They all seem to work fine, when I use &copy; within my stylesheet or
document I will see this entity back within the generated HTML page. But
when I use &euro; I just get a little square (in IE and in NS!) something
like this: [].

I don't think I've made any mistakes, because I use this DTD for a while
know, also with old versions of Cocoon, it all worked fine back then. If I
change <!ENTITY euro "&#128;"> to <!ENTITY euro "&#160;"> I get good output
(the cent sign), so it has something to do with the &#128; symbol. I've
tried changing the encoding of the XML document (US-ASCII, UTF-8,
iso-8859-1), they all don't help a thing.

I also tried to change the browser font, this also does no good. When I look
at the source of the generated page, I will also see the square, if I change
the square to &euro; myself, save the page locally and look at it locally it
will show the euro sign, so it's not a browser/font or whatever problem.

Does anyone know a solution for this problem?!

Regards,

Peter


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by "Peter C. Verhage" <pe...@zeelandnet.nl>.
: > I also tried to change the browser font, this also does no good. When I
look
: > at the source of the generated page, I will also see the square, if I
change
: > the square to &euro; myself, save the page locally and look at it
locally it
: > will show the euro sign, so it's not a browser/font or whatever problem.
:
: I think it is.
: Can you tell us your version of Xerces, Cocoon? (/Cocoon.xml)
: The java class formatter you are using, the output-encoding,
: and first, can you save the generated HTML and read with an hexa
: editor or dump the hexadecimal value of this square character ?

No it is not, like I said, I saved the HTML, the CSS stylesheets, everything
to my local disk. Just changed the [] to &euro; and look, everything was
showing up fine. I am totally sure I used the same font locally as I did on
the server, and it's even plain Arial, which certainly supports it in
Windows 2000.

I've supplied the hexidecimal values in another response...

Peter



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by "Peter C. Verhage" <pe...@zeelandnet.nl>.
: Shouldn't you be using
: <xml version="1.0" encoding="ISO-8859-1">

Tried that, doesn't help a thing. And the weird thing is, I did not change a
thing, and in old versions it did work...

BTW, I have looked at the page in a HEX editor, this is what I get (in Unix
the [] get's represented by 2! characters): C2 80. C2 is 194 and 80 is 128
in decimal. This means the seconds character seems OK, but the first one
screws it up somehow. Another thing is that in my pages normally signs like
these: ë, é get replaced in the HTML output by their entity names. But this
does not happen with the euro sign, which would be &euro;... I think
somewhere within Cocoon things gets messed up. I don't know which component
of Cocoon is responsible for this, so I just ask it on this mailinglist...

Peter


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by Tiberiu Dondera <ti...@hotmail.com>.
Just a wild guess... you probably have this, but just in case

Shouldn't you be using

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

so that these characters (euro, french/spanish accents) display correctly?
Maybe if the page is local, the browser automatically detects it, but not on
the server...

Tibi Dondera

----- Original Message -----
From: "Sébastien Koechlin" <sk...@ivision.fr>
To: <co...@xml.apache.org>
Sent: Wednesday, March 14, 2001 11:27 AM
Subject: Re: &euro; (&#128;) :(


> "Peter C. Verhage" wrote:
> > They all seem to work fine, when I use &copy; within my stylesheet or
> > document I will see this entity back within the generated HTML page. But
> > when I use &euro; I just get a little square (in IE and in NS!)
something
> > like this: [].
>
> It looks like a character undefined in your font.
>
> > I also tried to change the browser font, this also does no good. When I
look
> > at the source of the generated page, I will also see the square, if I
change
> > the square to &euro; myself, save the page locally and look at it
locally it
> > will show the euro sign, so it's not a browser/font or whatever problem.
>
> I think it is.
> Can you tell us your version of Xerces, Cocoon? (/Cocoon.xml)
> The java class formatter you are using, the output-encoding,
> and first, can you save the generated HTML and read with an hexa
> editor or dump the hexadecimal value of this square character ?
>
> --
> Sébastien Koechlin - IVision - skoechlin@ivision.fr
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by Sébastien Koechlin <sk...@ivision.fr>.
"Peter C. Verhage" wrote:
> They all seem to work fine, when I use &copy; within my stylesheet or
> document I will see this entity back within the generated HTML page. But
> when I use &euro; I just get a little square (in IE and in NS!) something
> like this: [].

It looks like a character undefined in your font.

> I also tried to change the browser font, this also does no good. When I look
> at the source of the generated page, I will also see the square, if I change
> the square to &euro; myself, save the page locally and look at it locally it
> will show the euro sign, so it's not a browser/font or whatever problem.

I think it is. 
Can you tell us your version of Xerces, Cocoon? (/Cocoon.xml)
The java class formatter you are using, the output-encoding,
and first, can you save the generated HTML and read with an hexa
editor or dump the hexadecimal value of this square character ?

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by Tagunov Anthony <at...@nnt.ru>.
Is this a Xerces question?
(Maybe there's a Xerces list somewhere and it should be asked there?)


On Tue, 13 Mar 2001 23:27:38 +0100, Peter C. Verhage wrote:

>I've specified the euro entity in a DTD which I use within my XML page and
>within my stylesheet. I also have some other special characters defined in
>this DTD like &copy; etc.
>
>They all seem to work fine, when I use &copy; within my stylesheet or
>document I will see this entity back within the generated HTML page. But
>when I use &euro; I just get a little square (in IE and in NS!) something
>like this: [].
>
>I don't think I've made any mistakes, because I use this DTD for a while
>know, also with old versions of Cocoon, it all worked fine back then. If I
>change <!ENTITY euro "&#128;"> to <!ENTITY euro "&#160;"> I get good output
>(the cent sign), so it has something to do with the &#128; symbol. I've
>tried changing the encoding of the XML document (US-ASCII, UTF-8,
>iso-8859-1), they all don't help a thing.
>
>I also tried to change the browser font, this also does no good. When I look
>at the source of the generated page, I will also see the square, if I change
>the square to &euro; myself, save the page locally and look at it locally it
>will show the euro sign, so it's not a browser/font or whatever problem.
>
>Does anyone know a solution for this problem?!
>
>Regards,
>
>Peter
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>
>
>




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by Klaus Malorny <Kl...@knipp.de>.

> 
> Yes, this last one did it. But it is still strange why the 128 stopped
> working, because it really did before. And if you use Windows and press
> ALT - 0128, you also get the euro symbol. The first one generated also a []
> BTW, fortunately the last one did not. :))
> 
> Thanks,
> 
> Peter
> 

The character entities &#nnn; or &#xnnn; always use Unicode in XML and HTML,
where the euro sign is at U+20AC (as others already said), but Microsoft uses
different encodings, where the euro sign is at the code position 128. In many
cases it is not a good idea to make conclusions for the world based on Microsoft
products :-)

Klaus

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by "Peter C. Verhage" <pe...@zeelandnet.nl>.
: Guess, maybe it should be
: <!ENTITY euro "&#x20A0;">
: <!ENTITY euro "&#8352;"> (the decimal equivalent to 20A0)
: or, maybe

: <!ENTITY euro "&#x20AC;">
: <!ENTITY euro "&#8364;"> (the decimal equivalent)

Yes, this last one did it. But it is still strange why the 128 stopped
working, because it really did before. And if you use Windows and press
ALT - 0128, you also get the euro symbol. The first one generated also a []
BTW, fortunately the last one did not. :))

Thanks,

Peter


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: € (€) :(

Posted by Tagunov Anthony <at...@nnt.ru>.
On Tue, 13 Mar 2001 23:27:38 +0100, Peter C. Verhage wrote:

>I've specified the euro entity in a DTD which I use within my XML page and
>within my stylesheet. I also have some other special characters defined in
>this DTD like &copy; etc.
>
>They all seem to work fine, when I use &copy; within my stylesheet or
>document I will see this entity back within the generated HTML page. But
>when I use &euro; I just get a little square (in IE and in NS!) something
>like this: [].
>
>I don't think I've made any mistakes, because I use this DTD for a while
>know, also with old versions of Cocoon, it all worked fine back then. If I
>change <!ENTITY euro "&#128;"> to <!ENTITY euro "&#160;"> I get good output

Guess, maybe it should be 
<!ENTITY euro "&#x20A0;">
<!ENTITY euro "&#8352;"> (the decimal equivalent to 20A0)
or, maybe 
<!ENTITY euro "&#x20AC;">
<!ENTITY euro "&#8364;"> (the decimal equivalent)

-- this is the result of searching UnicodeData.txt 
file that i got somehow from the www.unicode.org
site (it was not too intuitive to navigate it, and i can't
tell now from what section i got this)

(BTW: those file says that 0x00A2==162 is exactly the CENT SIGN
while 0x0080==128 is some control code)

>(the cent sign), so it has something to do with the &#128; symbol. I've
>tried changing the encoding of the XML document (US-ASCII, UTF-8,
>iso-8859-1), they all don't help a thing.

well, if you had set the encoding to US-ASCII or iso-8859-1
and actuall put a _byte_ with value 128 into your file, then,
probably you would get luck. (That is assuming that in 
US-ASCII or iso-8859-1 the code 128 really denotes euro,
while after &# or &#x a UNICODE value is expected)

>When I look
>at the source of the generated page, I will also see the square, if I change
>the square to &euro; myself, save the page locally and look at it locally it
>will show the euro sign, so it's not a browser/font or whatever problem.
>
>Does anyone know a solution for this problem?!
>
>Regards,
>
>Peter
>

Hope this helps!

Best regards, Tagunov Anthony

P.S. Be carefull with other 
>within my stylesheet. I also have some other special characters defined in
>this DTD like &copy; etc.
special characters in your docs! Looks like you should supply there Unicode
codes after &#, not latin-1 ;-)




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>