Changeset d9dcb1e for apps/addressbook


Ignore:
Timestamp:
Nov 28, 2011 8:32:23 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8619fd2
Parents:
bf461ee
Message:
  • Specify locale in all toLowerCase() and toUpperCase() calls to avoid "Turkish four i problem"
Location:
apps/addressbook/java/src/net/i2p/addressbook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/net/i2p/addressbook/ConfigIterator.java

    rbf461ee rd9dcb1e  
    2828import java.io.InputStreamReader;
    2929import java.util.Iterator;
     30import java.util.Locale;
    3031import java.util.Map;
    3132import java.util.NoSuchElementException;
     
    7273                String[] splitLine = inputLine.split("=");
    7374                if (splitLine.length == 2) {
    74                     next = new ConfigEntry(splitLine[0].trim().toLowerCase(), splitLine[1].trim());
     75                    next = new ConfigEntry(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
    7576                    return true;
    7677                }
  • apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java

    rbf461ee rd9dcb1e  
    3333import java.util.LinkedList;
    3434import java.util.List;
     35import java.util.Locale;
    3536import java.util.Map;
    3637
     
    9394            String[] splitLine = inputLine.split("=");
    9495            if (splitLine.length == 2) {
    95                 result.put(splitLine[0].trim().toLowerCase(), splitLine[1].trim());
     96                result.put(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
    9697            }
    9798            inputLine = input.readLine();
Note: See TracChangeset for help on using the changeset viewer.