diff options
author | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:03:46 +1000 |
---|---|---|
committer | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:03:46 +1000 |
commit | 05b82a50798b22e58e4f0919fbc0f94c4a1c1dc1 (patch) | |
tree | b85848b432adf458e3abda466ee46d9dfc3e454b /src/Java/gtPlusPlus/core/util | |
parent | 0966b4bdf5ff6a5ac4b825cd00b2461b09464c30 (diff) | |
download | GT5-Unofficial-05b82a50798b22e58e4f0919fbc0f94c4a1c1dc1.tar.gz GT5-Unofficial-05b82a50798b22e58e4f0919fbc0f94c4a1c1dc1.tar.bz2 GT5-Unofficial-05b82a50798b22e58e4f0919fbc0f94c4a1c1dc1.zip |
% Changed encoding of super/sub script characters to Unicode from Eclipses dirty default.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java index 1ccb0f771c..b94b35921f 100644 --- a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java +++ b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java @@ -106,30 +106,30 @@ public class MaterialUtils { } public static String superscript(String str) { - str = str.replaceAll("0", "⁰"); - str = str.replaceAll("1", "¹"); - str = str.replaceAll("2", "²"); - str = str.replaceAll("3", "³"); - str = str.replaceAll("4", "⁴"); - str = str.replaceAll("5", "⁵"); - str = str.replaceAll("6", "⁶"); - str = str.replaceAll("7", "⁷"); - str = str.replaceAll("8", "⁸"); - str = str.replaceAll("9", "⁹"); + str = str.replaceAll("0", "\u2070"); + str = str.replaceAll("1", "\u00B9"); + str = str.replaceAll("2", "\u00B2"); + str = str.replaceAll("3", "\u00B3"); + str = str.replaceAll("4", "\u2074"); + str = str.replaceAll("5", "\u2075"); + str = str.replaceAll("6", "\u2076"); + str = str.replaceAll("7", "\u2077"); + str = str.replaceAll("8", "\u2078"); + str = str.replaceAll("9", "\u2079"); return str; } public static String subscript(String str) { - str = str.replaceAll("0", "₀"); - str = str.replaceAll("1", "₁"); - str = str.replaceAll("2", "₂"); - str = str.replaceAll("3", "₃"); - str = str.replaceAll("4", "₄"); - str = str.replaceAll("5", "₅"); - str = str.replaceAll("6", "₆"); - str = str.replaceAll("7", "₇"); - str = str.replaceAll("8", "₈"); - str = str.replaceAll("9", "₉"); + str = str.replaceAll("0", "\u2080"); + str = str.replaceAll("1", "\u2081"); + str = str.replaceAll("2", "\u2082"); + str = str.replaceAll("3", "\u2083"); + str = str.replaceAll("4", "\u2084"); + str = str.replaceAll("5", "\u2085"); + str = str.replaceAll("6", "\u2086"); + str = str.replaceAll("7", "\u2087"); + str = str.replaceAll("8", "\u2088"); + str = str.replaceAll("9", "\u2089"); return str; } |