File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/org/jsoup/helper Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1414import java .io .RandomAccessFile ;
1515import java .nio .ByteBuffer ;
1616import java .nio .charset .Charset ;
17- import java .util .Locale ;
1817import java .util .Random ;
1918import java .util .regex .Matcher ;
2019import java .util .regex .Pattern ;
@@ -211,7 +210,11 @@ private static String validateCharset(String cs) {
211210 if (cs == null || cs .length () == 0 ) return null ;
212211 cs = cs .trim ().replaceAll ("[\" ']" , "" );
213212 if (PortUtil .charsetIsSupported (cs )) return cs ;
214- cs = cs .toUpperCase (Locale .ENGLISH );
213+ StringBuilder upperCase = new StringBuilder ();
214+ for (int i = 0 ; i < cs .length (); i ++) {
215+ upperCase .append (Character .toUpperCase (cs .charAt (i )));
216+ }
217+ cs = upperCase .toString ();
215218 if (PortUtil .charsetIsSupported (cs )) return cs ;
216219 // if our this charset matching fails.... we just take the default
217220 return null ;
You can’t perform that action at this time.
0 commit comments