GWT SuggestBox mapping of European characters to American keyboard

32 views
Skip to first unread message

Jonathan

unread,
Jun 22, 2012, 10:18:07 PM6/22/12
to google-we...@googlegroups.com

I have a GWT SuggestBox that contains a mix of European and American words as suggestions. For example, some words have European characters, such as français. My target audience is American so I would like to allow automatic mapping of similar letters on an American keyboard to the European characters. For example, instead of typing "français", the suggestbox would allow the user to type "francais" (c instead of ç). The page would then submit the form with the proper word "français" as the suggestbox value rather than exactly what the user typed in.

I'm hoping this might have been handled by somebody else already? Is this supported by a library?

Otherwise I'm assuming I would need to map the words with the European characters to American characters for the suggestbox and then map them back to the original European versions for submission back to the server. Perhaps there is a better way?

Jens

unread,
Jun 23, 2012, 7:58:03 AM6/23/12
to google-we...@googlegroups.com
Not sure if the result would be good in your case but instead of mapping european words, I would start and just strip out characters with european meaning. E.g. if the server receives "francais" as search string I would replace "c" with "_" because "c" can be a special european character and then do a query like SELECT x FROM y WHERE z LIKE 'fran_ais'. Underscore means "matches exactly one character". Obviously the query could return false positives, but its a bit more generic than having a word mapping and the result could be good enough.

-- J.
Reply all
Reply to author
Forward
0 new messages