Page 1 of 1

Glob *. * Nicht auf Pfaden mit Unicode in Java arbeiten?

Posted: 11 Apr 2025, 11:44
by Anonymous
Es scheint

Code: Select all

$ 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
Ist dies ein Java -Fehler oder gibt es eine vernünftige Erklärung dafür?