How-To handle i18n when you don't know charset?

From: Leon Spencer (
Date: Wed Jul 05 2000 - 19:48:19 EDT

What is the best way to handle i18n when you are passed a string and
you don't know the charset? I assume iso-8859-1 when I don't know the
charset BUT on some Spanish environments my data is coming out
garbage. It seems some of the characters are coming from iso-8859-2
(at least that's my first look).
My component that handles processing of the string data is separate
from the GUI where the user enters the data. The UI doesn't pass me
any charset information.
Should I require more information from the UI or is there a way to scan
the data that I am currently being passed and determine the appropriate
Since I'm in a Java environment, isn't there be a way to go to UTF-8 and
from UTF-8 determine the corresponding ISO (and other) charset?

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:05 EDT