Should we be lower-casing and switching on codepoints rather than the first character if a string can contain multiple-byte symbols?
Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/ poi/ss/format/CellFormatPart.java?rev=1815994&r1=1815993& r2=1815994&view=diff ============================================================ ================== --- poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java (original) +++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java Tue Nov 21 22:10:48 2017 @@ -18,6 +18,7 @@ package org.apache.poi.ss.format; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.util.LocaleUtil; +import org.apache.poi.util.StringUtil; import javax.swing.*; @@ -341,7 +342,7 @@ public class CellFormatPart { char c1 = repl.charAt(0); char c2 = 0; if (repl.length() > 1) - c2 = Character.toLowerCase(repl.charAt(1)); + c2 = StringUtil.toLowerCase(repl.charAt(1)).charAt(0); switch (c1) { case '@':