You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Timofey Korolev <tk...@linux-online.ru> on 2003/09/06 22:46:53 UTC

encoding question

Hello!

I've wrote a tapestry webapp that manipulates data (russian characters) 
in UTF-8.
When I'm viewing the source HTML-code of a generated page i got mixture
of normal russian letters (these letters are located in templates) and
something like 
&#1057;&#1087;&#1077;&#1094;&#1082;&#1091;&#1088; (for dynamically
generated data)

Nevertheless, browser shows everything perfectly. I wonder if it is
possible to generate everything in UTF-8, but not &#XXXX?


-- 
Regards,
CEO Linux-Online.Ru
Korolyov Timofey

www.linuxshop.ru :: www.prefnews.ru :: www.dotstyle.ru

JabberID: timoha@jabber.ru

Re: encoding question

Posted by Timofey Korolev <tk...@linux-online.ru>.
On Sun, 2003-09-07 at 02:33, Mindbridge wrote:


>     This may be an anachronism given the other developments in the
> framework, but I am curious -- why is this a problem for you? It would make
> the HTML a little bit bigger, but how is that an issue? If it is, wouldn't
> adding a compression filter in the servlet container configuration be a far
> more efficient way of dealing with the problem?
> 
>     Sorry, I am just curious what you are facing...
Now i got it ;-) Thank you.
Certainly this is not a problem, i was just thinking of two things:
1. i'm doing something wrong, 
2. i'm doing my phd work with tapestry and may be my boss ask me about
this mixture in HTML-code. Now i can explain him why this happens ;-)
Once again - thank you!





-- 
Regards,
CEO Linux-Online.Ru
Korolyov Timofey

www.linuxshop.ru :: www.prefnews.ru :: www.dotstyle.ru

JabberID: timoha@jabber.ru

Re: encoding question

Posted by Mindbridge <mi...@yahoo.com>.
Hi,

    I am sorry, at the moment this is hard coded in the code that handles
encoding of special characters (e.g. < as &lt;). All symbols with codes
above 128 are encoded as &#...; as well. Only strings that are guaranteed to
be 'safe' or are 'raw' are not encoded that way.

    This may be an anachronism given the other developments in the
framework, but I am curious -- why is this a problem for you? It would make
the HTML a little bit bigger, but how is that an issue? If it is, wouldn't
adding a compression filter in the servlet container configuration be a far
more efficient way of dealing with the problem?

    Sorry, I am just curious what you are facing...

Best regards,
-mb


----- Original Message ----- 
From: "Timofey Korolev" <tk...@linux-online.ru>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Sunday, September 07, 2003 12:58 AM
Subject: RE: encoding question



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


RE: encoding question

Posted by Timofey Korolev <tk...@linux-online.ru>.
On Sun, 2003-09-07 at 01:09, Adam Greene wrote:
> Are you running on a Linux platform (I assume that you are as you are using
> Evolution) and is your character set set to UTF-8 in Linux?

You are right.
I'm running tomcat in locale = "en_US.UTF-8"

>   If so, that is
> why your files display properly (if you don't match your OS character set to
> the character set you are using in Tapestry, the files come out all funny).
> Tapestry doesn't take any chances and converts the UTF-8 characters to their
> HTML escape equivilent (even then if their is an OS / Tapestry encoding
> mismatch it might not work right....)

I'm sorry, but i still don't get why this happens.
As i've mentioned i'm running Tomcat in locale en_US.UTF-8, do i have to
tell Tapestry that i'm using utf-8 in some other way, so that it won't
convert utf-8 to escape equivalent? If yes, then where can i "tell"
this?



-- 
Regards,
CEO Linux-Online.Ru
Korolyov Timofey

www.linuxshop.ru :: www.prefnews.ru :: www.dotstyle.ru

JabberID: timoha@jabber.ru

RE: encoding question

Posted by Adam Greene <ag...@romulin.com>.
Are you running on a Linux platform (I assume that you are as you are using
Evolution) and is your character set set to UTF-8 in Linux?  If so, that is
why your files display properly (if you don't match your OS character set to
the character set you are using in Tapestry, the files come out all funny).
Tapestry doesn't take any chances and converts the UTF-8 characters to their
HTML escape equivilent (even then if their is an OS / Tapestry encoding
mismatch it might not work right....)

-----Original Message-----
From: Timofey Korolev [mailto:tk@linux-online.ru]
Sent: Saturday, September 06, 2003 5:47 PM
To: Tapestry users
Subject: encoding question


Hello!

I've wrote a tapestry webapp that manipulates data (russian characters)
in UTF-8.
When I'm viewing the source HTML-code of a generated page i got mixture
of normal russian letters (these letters are located in templates) and
something like
&#1057;&#1087;&#1077;&#1094;&#1082;&#1091;&#1088; (for dynamically
generated data)

Nevertheless, browser shows everything perfectly. I wonder if it is
possible to generate everything in UTF-8, but not &#XXXX?


--
Regards,
CEO Linux-Online.Ru
Korolyov Timofey

www.linuxshop.ru :: www.prefnews.ru :: www.dotstyle.ru

JabberID: timoha@jabber.ru


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