diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index a46df0a..6c9391d 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -335,8 +335,7 @@
 
     /** Formats a double from 0.0..1.0 as a percentage. */
     private static String formatPercentage(double percentage) {
-      BidiFormatter bf = BidiFormatter.getInstance();
-      return bf.unicodeWrap(NumberFormat.getPercentInstance().format(percentage));
+      return NumberFormat.getPercentInstance().format(percentage);
     }
 
     public static boolean isBatteryPresent(Intent batteryChangedIntent) {
diff --git a/src/com/android/settings/fuelgauge/BatteryHistoryChart.java b/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
index fbd0ea3..11e821a 100644
--- a/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
+++ b/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
@@ -494,6 +494,7 @@
         mMinPercentLabelString = Utils.formatPercentage(0);
 
         mBatteryLevel = com.android.settings.Utils.getBatteryLevel(mBatteryBroadcast);
+        String batteryPercentString = Utils.formatPercentage(mBatteryLevel);
         long remainingTimeUs = 0;
         mDischarging = true;
         if (mBatteryBroadcast.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) == 0) {
@@ -503,9 +504,9 @@
                 String timeString = Formatter.formatShortElapsedTime(getContext(),
                         drainTime / 1000);
                 mChargeLabelString = getContext().getResources().getString(
-                        R.string.power_discharging_duration, mBatteryLevel, timeString);
+                        R.string.power_discharging_duration, batteryPercentString, timeString);
             } else {
-                mChargeLabelString = Utils.formatPercentage(mBatteryLevel);
+                mChargeLabelString = batteryPercentString;
             }
         } else {
             final long chargeTime = mStats.computeChargeTimeRemaining(elapsedRealtimeUs);
@@ -530,10 +531,10 @@
                     resId = R.string.power_charging_duration;
                 }
                 mChargeLabelString = getContext().getResources().getString(
-                        resId, mBatteryLevel, timeString);
+                        resId, batteryPercentString, timeString);
             } else {
                 mChargeLabelString = getContext().getResources().getString(
-                        R.string.power_charging, mBatteryLevel, statusLabel);
+                        R.string.power_charging, batteryPercentString, statusLabel);
             }
         }
         mDrainString = "";
diff --git a/src/com/android/settings/fuelgauge/BatterySaverSettings.java b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
index bd989d0..94620cc 100644
--- a/src/com/android/settings/fuelgauge/BatterySaverSettings.java
+++ b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
@@ -37,6 +37,7 @@
 import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.Utils;
 import com.android.settings.notification.SettingPref;
 import com.android.settings.widget.SwitchBar;
 
@@ -78,7 +79,8 @@
             @Override
             protected String getCaption(Resources res, int value) {
                 if (value > 0 && value < 100) {
-                    return res.getString(R.string.battery_saver_turn_on_automatically_pct, value);
+                    return res.getString(R.string.battery_saver_turn_on_automatically_pct,
+                                         Utils.formatPercentage(value));
                 }
                 return res.getString(R.string.battery_saver_turn_on_automatically_never);
             }
