Skip to content

Commit 17c2a0c

Browse files
committed
Normalize string resource keys
This should fix issue #7.
1 parent 79bca23 commit 17c2a0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/com/joelchristophel/sourceradio/FileUtilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static List<String> getLines(String path, boolean includeBlankLines) {
3232
String line = null;
3333
while ((line = reader.readLine()) != null) {
3434
if (!line.trim().isEmpty() || includeBlankLines) {
35-
lines.add(line.replace(((char) 65279 + ""), ""));
35+
lines.add(line);
3636
}
3737
}
3838
} catch (IOException e) {

src/com/joelchristophel/sourceradio/StringResources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected Object[][] getContents() {
2525
String[][] contents = new String[lines.size()][2];
2626
for (int i = 0; i < contents.length; i++) {
2727
String[] chunks = lines.get(i).split("=");
28-
contents[i][0] = chunks[0];
28+
contents[i][0] = chunks[0].replaceAll("[^a-zA-Z0-9_]+", "");
2929
contents[i][1] = chunks[1];
3030
}
3131
return contents;

0 commit comments

Comments
 (0)