Skip to content

Commit be60e48

Browse files
committed
2 parents eb3a874 + 3e31472 commit be60e48

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The <action> type attribute can be add,update,fix,remove.
5555
<action dev="ggregory" type="fix" issue="IO-860" due-to="Stefan Feenstra, Gary Gregory">Missing reserved file names in FileSystem.WINDOWS (superscript digits for COM and LPT).</action>
5656
<action dev="ggregory" type="fix" issue="IO-856" due-to="Thomas Hartwig, Gary Gregory">FileUtils.listFiles(final File, String[], boolean) can throw NoSuchFileException #697, #699.</action>
5757
<action dev="ggregory" type="fix" issue="IO-859" due-to="JD Dean, Gary Gregory">FileUtils.forceDelete on non-existent file on Windows throws IOException rather than FileNotFoundException.</action>
58+
<action dev="ggregory" type="fix" due-to="Éamonn McManus">Use Unicode escapes for superscript characters. #701.</action>
5859
<!-- ADD -->
5960
<action dev="ggregory" type="add" due-to="Gary Gregory">Add @FunctionalInterface to ClassNameMatcher.</action>
6061
<action dev="ggregory" type="add" due-to="Gary Gregory">Add ValidatingObjectInputStream.Builder and ValidatingObjectInputStream.builder().</action>

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)