You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Anthony Tagunov <ta...@newmail.ru> on 2002/01/06 18:35:19 UTC
[standard-EA3 comment]: setLocale vs setCharacter encoding
Hello developers!
Is this the correct forum to send comments on
Standard Taglib early access 3?
If yes, here's my comment:
1) some servlet containers do not set any character
encoding after response.setLocale()
(this is true at least for Tomcat of all versions
and for Weblogic versions 6.0sp1 and 6.1,
for Locale.JAPAN and new Locale("ru","RU"))
2) some servlet containers do set a charcter
encoding after response.setLocale(), but
for example for new Locale("ru","RU")
they set ISO-8859-1, that is not
desirable, as windows-1251 or koi8-r are
in wide practical use, not ISO-8859-1.
So what could the solution be?
One option is to include the character
set name into the resource bundle, under
some special key, like
javax.servlet.jsp.jstl.i18n.(request.)charset,
this will help when the locale is set
accordingly to the bundle in automatic mode.
Also, the <locale> tag may be given the
<locale charset="windows-1251"> attribute.
In any case the selected charset could be stored
to the
javax.servlet.jsp.jstl.i18n.request.charset
attribute of the appropriate scope
as it is done now.
Every time the locale is
retrived from
javax.servlet.jsp.jstl.i18n.locale
attribute and passed to response.setLocale() the value from
javax.servlet.jsp.jstl.i18n.(request.)charset
could also be passed to the response.setContentType.
Unfortunantly this would require setting the contentType
also somewhere.. Not swell, but looks quite necessary.
Best regards, Anton Tagunov
--
Best regards,
Anthony mailto:tagunov@newmail.ru
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>