cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <u...@denic.de>
Subject Re: external entities
Date Thu, 18 May 2000 13:40:09 GMT
Mike Engelhart wrote:
> 
> on 5/18/00 6:36 AM, Ulrich Mayring at ulim@denic.de wrote:
> 
> > The error happens in your Java code, not in cocoon, which already gets a
> > '?' from Java. Look in the docs for ResourceBundle, there are
> > locale-aware methods for getting a ResourceBundle.
> >
> > Ulrich
> Not quite.  I AM using Locale-aware methods or else I wouldn't be having a
> problem because everything would be in English.  When I set my browser to
> have a language setting of "de" and call my XSP page, the output is mangled

This shouldn't have anything to do with your browser setting, because
entities are rendered independent of any browser language setting. So
you say you are constructing a German (or whatever) locale in your Java
code and pass it to the ResourceBundle? I have been doing this and it
worked for me, that's why I wonder.

> with a "?" in place of the special characters that are in my Properties
> files.   What Paul was saying is that I need to somehow get the correct
> characters into my PropertyResourceBundles but how the heck do you do that?
> I'm using a CodeWarrior as my development tool and there isn't any setting
> for character encoding.  I guess what I'm wondering is that if I have an
> ASCII text file with a "รค" in it, why doesn't Java create the correct
> unicode representation of that character in my ResourceBundle so that when
> I
> call getString() it just shows up.  this is why I started screwing around
> with sticking entities in my properties files.

getString() is a locale-independent method, however, the ResourceBundle
static method isn't. So getString() will return values appropriate for
the locale the ResourceBundle was constructed with.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Mime
View raw message