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

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Glob *. * Nicht auf Pfaden mit Unicode in Java und MacOS arbeiten?

by Anonymous » 11 Apr 2025, 19:20

Es scheint$ 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
< /code>
Ist dies ein Java -Fehler oder gibt es dafür eine vernünftige Erklärung?
Dieses Problem scheint nur auf MacOS da zu sein. Unter Windows und Linux kehren beide Ausdrücke für mich wahr zurück.

Top