tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Migrating to tomcat 6 gives formatted currency amounts problem
Date Fri, 12 Sep 2008 16:29:45 GMT
> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
> Subject: Re: Migrating to tomcat 6 gives formatted currency
> amounts problem
>
> If this locale stuff is in fact defaulting to an ISO char set
> that can do these symbols...

There's the basic problem - anytime you allow defaults to come into play you put yourself
at risk.

> and say you where making a non english page, say
> Japanese... do you think that its possible to use it?

Certainly, and you should use it - but with the desired Locale specified, not using whatever
the default happens to be at that instant.

> they using the getCurrencyInstance to make the currency symbols.

But, if you want a specific currency symbol (e.g., Yen, Pound Sterling), the Locale should
be explicitly provided on the API call; only if you want to use the platform's default should
the getCurrencyInstance() without an argument be used.

> But I'm thinking its a US/Eng only methodology...

Nope, it's universal.  Java supports a seemingly infinite number of locales.

> When you say.... "If I override that with say ISO-8859-15",
> is that the whole page you talking about

Yes, I was setting the browser to use a fixed encoding rather than the one in the HTTP header
or the browser default.

> it possible to have  different character encoding sections
> in a web page....

I don't know HTML well enough to completely answer that question, but I believe HTTP uses
the last character set header specified, and all HTTP headers must precede the HTML.  You
should be able to achieve the desired effect with frames.  However, if you just use UTF-8,
you don't need to worry about, since that includes every code point in the known universe.

> if I do look at that test page in a MS tool...
> it displays correctly with mixed encodings?

MS cheats at every opportunity, seemingly avoiding standards whenever they can.  IE likes
to guess at the intent of the web page, sometimes getting it right, often getting it horribly
wrong.

> But when you choose a font in a text editor like Swing or
> Word, you are also picking some character set...

Nope - most editors do not let you choose the character encoding, they just use the platform
default.  Some do let you choose a UTF-x flavor in lieu of the platform default, which is
quite desirable.  Some fonts (e.g., Wingdings) redefine the glyphs for given code points in
order to display oddball symbols within a non-Unicode encoding; these were pretty much all
developed before Unicode came into widespread use, but are still around for compatibility.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message