[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Re: Encoding problems with russian / bean:write / html:text
From: Sergey Livanov <Sergey.Livanov () ukrpost ! net>
Date: 2005-02-28 16:24:59
Message-ID: 233751890.20050228182459 () ukrpost ! net
[Download RAW message or body]
Hi Leon, try this,
This construction works fine for me, ( eng, russian, ukrainian, fr )
1. page encoding "charset=windows-1251" ;
2. set up Forms reset method
public void reset( ActionMapping mapping, HttpServletRequest request ){
this.search = null;
try {
request.setCharacterEncoding( "windows-1251" ) ;
}
catch ( java.io.UnsupportedEncodingException e ) {}
}
3. Convert your symbols using
native2ascii Applicationresources_ru.properties_ru \
Applicationresources_ru.properties native2ascii \
Applicationresources_de.properties_de Applicationresources_de.properties
Sergey,
LR> Hi,
LR> First of all, I'm not very experienced with encoding, so it's could be a very \
newbie problem. LR> I have a website-builder, which generates a complete struts \
web-app out of an xml file. LR> However I now have a customer who wants to present \
his data in russian and german. LR> The data for presentation is entered and stored \
via Dialogs produced with html taglib, like: LR> <html:text property="name"/>
LR> then, it's stored on the disk as a serializable object. Then it's presented in \
another html-page via bean:write. If I give both the page and the meta tags charset \
UTF-8, I get only complete crap LR> like ?µN??? in the presentation page.
LR> If I use iso-8859-1, bean:write produces things like: \
вавава, the html-sourcecode is \
&#1074;&#1072;&#1074;&#1072;&#1074;&#1072; (the LR> source \
string was something like qwqwqwqw in russian).
LR> If I add filter="false" to the bean:write call, everything works fine (with \
iso-8859-1). LR> Unfortunately there is no filter option in html:text tag, so as \
soon as I present the data in edit-form for editing LR> aain, I see the в in \
the input form.
LR> So I assume, I'm making an idiotical mistake, but I don't have much experience \
with editing in russian, so I'd like to ask, if anyone can point me to the right \
direction.
LR> Thanx in advance
LR> Leon
--
regards,
Sergey mailto:Sergey.Livanov@ukrpost.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic