-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
11, 17, 24, 25
-
generic
-
os_x
ADDITIONAL SYSTEM INFORMATION :
macOS Monterey
A DESCRIPTION OF THE PROBLEM :
It seems Java's glob path matcher isn't matching some unicode symbols.
Note that this does return true on Windows and Linux
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
---------- BEGIN SOURCE ----------
$ jshell
| Welcome to JShell -- Version 24
| For an introduction type: /help intro
jshell> var matcher = java.nio.file.FileSystems.getDefault().getPathMatcher("glob:*.*")
...>
matcher ==> sun.nio.fs.UnixFileSystem$1@2328c243
jshell> matcher.matches(new java.io.File("Article.md").toPath())
...>
$2 ==> true
jshell> matcher.matches(new java.io.File("🗞️ Article.md").toPath())
...>
$3 ==> false
---------- END SOURCE ----------
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
matcher.matches(new java.io.File("🗞️ Article.md").toPath()) returns true
ACTUAL -
matcher.matches(new java.io.File("🗞️ Article.md").toPath()) returns false
macOS Monterey
A DESCRIPTION OF THE PROBLEM :
It seems Java's glob path matcher isn't matching some unicode symbols.
Note that this does return true on Windows and Linux
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
---------- BEGIN SOURCE ----------
$ jshell
| Welcome to JShell -- Version 24
| For an introduction type: /help intro
jshell> var matcher = java.nio.file.FileSystems.getDefault().getPathMatcher("glob:*.*")
...>
matcher ==> sun.nio.fs.UnixFileSystem$1@2328c243
jshell> matcher.matches(new java.io.File("Article.md").toPath())
...>
$2 ==> true
jshell> matcher.matches(new java.io.File("🗞️ Article.md").toPath())
...>
$3 ==> false
---------- END SOURCE ----------
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
matcher.matches(new java.io.File("🗞️ Article.md").toPath()) returns true
ACTUAL -
matcher.matches(new java.io.File("🗞️ Article.md").toPath()) returns false
- relates to
-
JDK-8354490 Pattern.CANON_EQ causes a pattern to not match a string with a UNICODE variation
-
- Open
-