Re: svn commit: r1815994 - in /poi/trunk/src: java/org/apache/poi/sl/usermodel/ java/org/apache/poi/ss/format/ java/org/apache/poi/util/ ooxml/java/org/apache/poi/xssf/usermodel/helpers/ resources/devtools/ scratchpad/src/org/apache/poi/hwpf/dev/

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1815994 - in /poi/trunk/src: java/org/apache/poi/sl/usermodel/ java/org/apache/poi/ss/format/ java/org/apache/poi/util/ ooxml/java/org/apache/poi/xssf/usermodel/helpers/ resources/devtools/ scratchpad/src/org/apache/poi/hwpf/dev/

Javen O'Neal-2
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 '@':
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1815994 - in /poi/trunk/src: java/org/apache/poi/sl/usermodel/ java/org/apache/poi/ss/format/ java/org/apache/poi/util/ ooxml/java/org/apache/poi/xssf/usermodel/helpers/ resources/devtools/ scratchpad/src/org/apache/poi/hwpf/dev/

pj.fanning
I just added some code that iterates code points. It looks like there will be
a lot of other code that needs to be modified but this is just an initial
toe in the water.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]