Skip to content

Commit

Permalink
util: use a fixed locale in case conversion when retrieving the decod…
Browse files Browse the repository at this point in the history
…er factory
  • Loading branch information
carlosame committed Dec 15, 2024
1 parent 30a717a commit bee07e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.InputStream;
import java.io.Reader;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import io.sf.carte.echosvg.util.EncodingUtilities;
Expand Down Expand Up @@ -157,7 +158,7 @@ public void close() throws IOException {
* Creates the CharDecoder mapped with the given encoding name.
*/
protected CharDecoder createCharDecoder(InputStream is, String enc) throws IOException {
CharDecoderFactory cdf = charDecoderFactories.get(enc.toUpperCase());
CharDecoderFactory cdf = charDecoderFactories.get(enc.toUpperCase(Locale.ROOT));
if (cdf != null) {
return cdf.createCharDecoder(is);
}
Expand Down

0 comments on commit bee07e9

Please sign in to comment.