Hello!

I need to save unicode strings and also create a "ascii version" of
them (to make a keyword list for searching purposes) such as:
"Animale, cu excepţia peştelui" => ["ANIMALE", "EXCEPTIA", "PESTELUI"]

For that i need the following conversions: ţ -> t, ş -> s and so on.
My first approach was the following:

                orig = Normalizer.normalize(field, Form.NFKD).toCharArray();
                ascii = new byte[orig.length];
                count = 0;
                for (int i = 0; i < orig.length; i++) {
                        if (orig[i] < 128) {
                                ascii[count++] = (byte) orig[i];
                        }
                }
                try {
                        field = new String(ascii, "UTF-8");
                }
                catch (UnsupportedEncodingException e) {
                        e.printStackTrace();
                }

This works very well in java generally, but when i tried it in an app-
engine project i got a compiler error:

"java.text.Normalizer.Form is not supported by Google App Engine's
Java runtime environment"

What workaround do you suggest?

Thank you,
Cornel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to