You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Oleg V Alexeev <go...@penza.net> on 2000/09/07 11:46:31 UTC

Problems with locale in struts.

Hello friends,

  I have a problem with using <struts:message> tag. English and
  Russian properties files located in some directiry and
  <struts:message> work fine with it - prints Russian or English
  strings according current locale.
  But when I use in my pages beans for database access I need to
  insert to my pages such directive as
  
   <%@ page contentType="text/html;charset=windows-1251" %>

  because of data retrieved from database prints as '?' without this
  directive. And with this directive <struts:message> prints its
  messages as '?' too! What is this? How can I break this magic ring?

-- 
Best regards,
 Oleg                          mailto:gonza@penza.net



Re[2]: Problems with locale in struts.

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Craig,

Thursday, September 07, 2000, 7:49:30 PM, you wrote:

CRM> This is a problem with Struts, because the resource bundles themselves
CRM> are being loaded using the system default character set, rather than a
CRM> character set appropriate to the locale in use.  I need to do some
CRM> research to figure out how to solve this one.

Thank you. Is it in your closest plans or no?

-- 
Best regards,
 Oleg                            mailto:gonza@penza.net



Re: Problems with locale in struts.

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Oleg V Alexeev wrote:

> Hello friends,
>
>   I have a problem with using <struts:message> tag. English and
>   Russian properties files located in some directiry and
>   <struts:message> work fine with it - prints Russian or English
>   strings according current locale.
>   But when I use in my pages beans for database access I need to
>   insert to my pages such directive as
>
>    <%@ page contentType="text/html;charset=windows-1251" %>
>
>   because of data retrieved from database prints as '?' without this
>   directive. And with this directive <struts:message> prints its
>   messages as '?' too! What is this? How can I break this magic ring?
>

This is a problem with Struts, because the resource bundles themselves
are being loaded using the system default character set, rather than a
character set appropriate to the locale in use.  I need to do some
research to figure out how to solve this one.

>
> --
> Best regards,
>  Oleg                          mailto:gonza@penza.net

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat