You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Leos Literak <li...@centrum.cz> on 2002/01/21 23:58:48 UTC

localization; nulls in vm

Hi,

I've got two issues. First is wish for better documentation
about localization. I would be interested in prefered way
with dealing with clients charset. Well, I use ISO-8859-2
only. After many hours of tests with LC-CTYPE=czech and
response.setContentType("text/html; charset=ISO-8859-2"),
I've realized, that Velocity overrides these settings
and all I need to do, is to set output.encoding to my
charset. So, it would be nice to cover such situation in
doc, so other developers will not repeat my mistake.

But still, why Velocity does override charset settings in
response.setContentType("text/html; charset=ISO-8859-2")?
If it used just response.getOutputStream(), everything would
be fine. But it tries to its charset :-(
What if I need to support both ISO-8859-2 and Windows-1250
charsets?

Second issue is usage of null argument in method calls
in velocity. I have method $URL.make('/EditCategory',null)
but is never called, probably because of "null" argument.
I've searched even source file of parser and it looks, like
null is not supported. Am I right? And if I am, is there
any reason for this? Now I will have to create such hack
in source code:
public String makeWithNull(String url) {
   return make(url, null);
}
I would be happy, if null was supported ...

Thanks and please CC me again

	Leo



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>