From 5946838b8efc86bb569cdf7945e8a9d8a551bfda Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 5 Jul 2012 14:13:21 +0900 Subject: [PATCH] Fix upper case Eszett more key Bug: 6773873 Change-Id: I1a533c729c312a53663fb142cb6fcb4915b53206 --- .../keyboard/internal/KeySpecParser.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java index c4452a5f5..53261205d 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java @@ -68,12 +68,20 @@ public class KeySpecParser { public MoreKeySpec(final String moreKeySpec, boolean needsToUpperCase, Locale locale, final KeyboardCodesSet codesSet) { - mCode = toUpperCaseOfCodeForLocale(getCode(moreKeySpec, codesSet), - needsToUpperCase, locale); mLabel = toUpperCaseOfStringForLocale(getLabel(moreKeySpec), needsToUpperCase, locale); - mOutputText = toUpperCaseOfStringForLocale(getOutputText(moreKeySpec), + final int code = toUpperCaseOfCodeForLocale(getCode(moreKeySpec, codesSet), needsToUpperCase, locale); + if (code == Keyboard.CODE_UNSPECIFIED) { + // Some letter, for example German Eszett (U+00DF: "ß"), has multiple characters + // upper case representation ("SS"). + mCode = Keyboard.CODE_OUTPUT_TEXT; + mOutputText = mLabel; + } else { + mCode = code; + mOutputText = toUpperCaseOfStringForLocale(getOutputText(moreKeySpec), + needsToUpperCase, locale); + } mIconId = getIconId(moreKeySpec); } }