From 18bce12c5916331971b2e8108f8485cc56b696d3 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Fri, 6 Jan 2012 09:29:25 -0800 Subject: Fix locale handling of uppercase/lowercase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changeset fixes issue 23747: i and İ character problem in turkish operating Systems... and probably many other bugs in the Turkish locale. Basically, we had a lot of String.toLowerCase() and String.toUpperCase() calls. This performs locale sensitive conversions, which in many cases is NOT what we want; for "machine readable" conversions we should be using Locale.US which performs no special cases. For more, see http://developer.android.com/reference/java/util/Locale.html#default_locale Change-Id: I996b0e70fb377e8dae484c5811deb8bc9afb684c --- .../com/android/sdkuilib/internal/repository/icons/ImageFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sdkmanager/libs/sdkuilib') diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java index 03b5a5b..fa2e360 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java @@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.Display; import java.io.InputStream; import java.util.HashMap; import java.util.Iterator; +import java.util.Locale; import java.util.Map; @@ -101,7 +102,7 @@ public class ImageFactory { if (clz.endsWith(Package.class.getSimpleName())) { String name = clz.replaceFirst(Package.class.getSimpleName(), "") //$NON-NLS-1$ .replace("SystemImage", "sysimg") //$NON-NLS-1$ //$NON-NLS-2$ - .toLowerCase(); + .toLowerCase(Locale.US); name += "_pkg_16.png"; //$NON-NLS-1$ return getImageByName(name); } -- cgit v1.1