Skip to content

Commit

Permalink
Merge pull request #13 from garydgregory/turkish-fix
Browse files Browse the repository at this point in the history
Fix for classic toUpperCase gotcha when locale is Turkish
  • Loading branch information
davsclaus committed Apr 6, 2014
2 parents 9bab505 + 6322936 commit 20a1ebb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jansi/src/main/java/org/fusesource/jansi/AnsiRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.fusesource.jansi;

import java.util.Locale;

import org.fusesource.jansi.Ansi.Attribute;
import org.fusesource.jansi.Ansi.Color;

Expand Down Expand Up @@ -102,7 +104,7 @@ static public String render(final String input) throws IllegalArgumentException
static private String render(final String text, final String... codes) {
Ansi ansi = Ansi.ansi();
for (String name : codes) {
Code code = Code.valueOf(name.toUpperCase());
Code code = Code.valueOf(name.toUpperCase(Locale.ENGLISH));

if (code.isColor()) {
if (code.isBackground()) {
Expand Down

0 comments on commit 20a1ebb

Please sign in to comment.