You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alvin antony <al...@yahoo.com> on 2003/11/07 17:12:10 UTC

Problems with charset iso8859_1 and encoding

Hi *,
        I am desperately looking for a solution on this. Sorry  for my poor knowledge on Unicode standards. 
Problem:
        In my application users are allowed to type data in different languages, for example 'Greek'. 
A Greek alphabet ' Ã ' is represented in ISO8859_1 as &#915; but when  I use any of the tags in struts, it converts this to &amp#915.
I assume struts treats '&' as HTML sensitive comp.. but it isn't here. When i use <%=myBean.getProperty() %> it prints ' Ã ' that is correct. 
 
I write two lines in my jsp's to convert to ISO8859_1.
 
1. <META http-equiv="Content-Type" content="text/html; charset=iso8859_1" />
2. <%@page contentType="text/html; charset=iso8859_1" %>
 
any help is highly appreciated
 
Thanks in advance
Alvin
 
 
 
alvin antony <al...@yahoo.com> wrote:
Hello guys,

I didn't found any from Struts solution for the my last mail (find below), but I managed to correct it by adding a line in my Tiles layout file


Now I run into new problem that, the not understands this charset or interprets differently :-/ . I have to set 'filter' to false, in order to work.

If any anybody know where I have to set that DEFAULT value for 'filter' in is FALSE instead of TRUE?

I tried set in the struts-bean.tld's found in /WEB-INF folder and in the Struts.jar. doesn't help:-/ .Any help?

Thanks a lot

Alvin




alvin antony wrote:

Hello Friends,
I am coming back to the Struts mailing list after a long period. 

I have a problem with my Struts Application , that allows the users to fill in a form. When a user type in Greek letter's into the application and later reads backs to the browser from the application it shown as another letter, but when I change the coding on the browsing to Greek(Windows), it shows the correct letter. Is it possible encode characters automatically from Struts Framework.

I tried already to define Controller in the Struts Config as given below

. 

but with out success. 
If any body can help us on this, would be great.

Thanks

Alvin






Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.


Alvin K. Antony
Ludwig-Maximilians-Universität München
Referat Internet
Softwareentwicklung
Oettingenstraße 67
80538 München
Germany
-------------------------------------------
Phone: +49 (0)89 2102-5979
Fax: +49 (0)89 2102-5980

Mobile: +49 (0)160 97340713

E-Mail: aantony@lmu.de

Web: http://www.lmu.de/internet/
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.

Re: Problems with charset iso8859_1 and encoding

Posted by Vic Cekvenich <ce...@baseBeans.com>.
Consider posting in TagLibs list.
This is covered very nicely in JSTL (aka Standard Tags), read up on set 
encoding in
http://java.sun.com/webapps/download/Display?BundleId=8776
and let me know if you then have a question. They even have examples.
(or start here 
http://jakarta.apache.org/taglibs/doc/standard-doc/standard/index.html)

Also both JSTL books cover encoding.

.V


alvin antony wrote:

> Hi *,
>         I am desperately looking for a solution on this. Sorry  for my poor knowledge on Unicode standards. 
> Problem:
>         In my application users are allowed to type data in different languages, for example 'Greek'. 
> A Greek alphabet ' Ã ' is represented in ISO8859_1 as &#915; but when  I use any of the tags in struts, it converts this to &amp#915.
> I assume struts treats '&' as HTML sensitive comp.. but it isn't here. When i use <%=myBean.getProperty() %> it prints ' Ã ' that is correct. 
>  
> I write two lines in my jsp's to convert to ISO8859_1.
>  
> 1. <META http-equiv="Content-Type" content="text/html; charset=iso8859_1" />
> 2. <%@page contentType="text/html; charset=iso8859_1" %>
>  
> any help is highly appreciated
>  
> Thanks in advance
> Alvin
>  
>  
>  
> alvin antony <al...@yahoo.com> wrote:
> Hello guys,
> 
> I didn't found any from Struts solution for the my last mail (find below), but I managed to correct it by adding a line in my Tiles layout file
> 
> 
> Now I run into new problem that, the not understands this charset or interprets differently :-/ . I have to set 'filter' to false, in order to work.
> 
> If any anybody know where I have to set that DEFAULT value for 'filter' in is FALSE instead of TRUE?
> 
> I tried set in the struts-bean.tld's found in /WEB-INF folder and in the Struts.jar. doesn't help:-/ .Any help?
> 
> Thanks a lot
> 
> Alvin
> 
> 
> 
> 
> alvin antony wrote:
> 
> Hello Friends,
> I am coming back to the Struts mailing list after a long period. 
> 
> I have a problem with my Struts Application , that allows the users to fill in a form. When a user type in Greek letter's into the application and later reads backs to the browser from the application it shown as another letter, but when I change the coding on the browsing to Greek(Windows), it shows the correct letter. Is it possible encode characters automatically from Struts Framework.
> 
> I tried already to define Controller in the Struts Config as given below
> 
> . 
> 
> but with out success. 
> If any body can help us on this, would be great.
> 
> Thanks
> 
> Alvin
> 
> 
> 
> 
> 
> 
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.
> 
> 
> Alvin K. Antony
> Ludwig-Maximilians-Universität München
> Referat Internet
> Softwareentwicklung
> Oettingenstraße 67
> 80538 München
> Germany
> -------------------------------------------
> Phone: +49 (0)89 2102-5979
> Fax: +49 (0)89 2102-5980
> 
> Mobile: +49 (0)160 97340713
> 
> E-Mail: aantony@lmu.de
> 
> Web: http://www.lmu.de/internet/
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.

-- 
Victor Cekvenich,
Struts Instructor
(215) 321-9146

Advanced Struts Training
<http://basebeans.com/do/cmsPg?content=TRAINING> Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing, <http://basicportal.com> software, ready
to develop/customize; requires a db to run.



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