okio
okio copied to clipboard
Kotlin/Native on Windows with special characters in Path
I try to list the contents of a directory that contains files with special characters (German Umlaute like: ö, ä, ü, ß).
The Path objects of the files are returned, but when using them I get a FileNotFoundException.
Uncaught Kotlin exception: okio.FileNotFoundException: no such file: c:\temp\test�.txt
When calling exists() it always returns false.
I run the following code:
FileSystem.SYSTEM.list("c:\\temp".toPath()).forEach {
if (!FileSystem.SYSTEM.exists(it)) {
println("Not found $it")
}
}
How can I enable special character support?
I use Kotlin 1.5.31 with okio 3.0.0. Tried to run this on Windows 10 and Windows Server 2012
I've added tests and all passed, including Windows in #1086. Would you be able to write a failing test on Okio?