Skip to content

Commit b56b963

Browse files
Use Unicode escapes for superscript characters. (#701)
This file is encoded with ISO-8859-1 (or Windows-1252) which causes problems if it is compiled on a system that expects UTF-8. It might be better to switch the whole project to use UTF-8 encoding for source files, but that's a much bigger change.
1 parent 8dca0f4 commit b56b963

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/apache/commons/io/FileSystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ public enum FileSystem {
9090
}, new String[] {
9191
"AUX",
9292
"COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
93-
"COM²", "COM³", "COM¹", // Yes, that's the order in Unicode
93+
"COM\u00b2", "COM\u00b3", "COM\u00b9", // Superscript 2 3 1 in that order
9494
"CON", "CONIN$", "CONOUT$",
9595
"LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",
96-
"LPT²", "LPT³", "LPT¹", // Yes, that's the order in Unicode
96+
"LPT\u00b2", "LPT\u00b3", "LPT\u00b9", // Superscript 2 3 1 in that order
9797
"NUL", "PRN"
9898
}, true, true, '\\');
9999
// @formatter:on

0 commit comments

Comments
 (0)