I'd like to convert a String objet to a String containing only ascii 7 bits upper case characters,
without accents.
Using myString.toUpperCase(Locale.US) returns "MÉTHODE" when the original string is "Méthode" while
I'd like to get "METHODE".
What should I use ?
How to avoid the Unicode richness ??!
Best Regards
Thanks for any input
bspikol a écrit:
Your real problem is that there is no mathematical connection between accented
characters and their non-accented equivalents. You will have to use some form
of hash table using the ASCII / UNICODE value as key for those characters. Sorry
my Java isn't up to actually producing code for it yet.
-------
Pauline
is it what you meant ?
Best Regards
Pauline Seymour a écrit:
That may not be the case - I've just noticed (having read a few of the
posts on this subject, which I don't know a lot about, I must admit)
that Olivier is using Locale.US for his case conversion. I am told
that the Québécois prefer to have accents on their uppercase letters as
well, whereas most Europeans don't. Could it be that the US locale has
this rule as well? Why not try Locale.FR and tell us how you get on?
You'll have to get an international version of the runtime for this sort
of thing to work, if you haven't already.
--
Matt Francomb