The file names appear as shown above in Windows's Explorer (UTF-16). Unless this is intentional, I'd consider this a bug...
C:
#include <stdio.h>
void main() {
FILE *h = fopen("tatü2.txt", "w+");
fclose(h);
}
Nim:
import os
var f = open("tatü2.txt", fmAppend)
close(f)
All Nim source files are in the UTF-8 encoding (or its ASCII subset). Other encodings are not supported.
@BlaXpirit: Guessed you would say that ;-)
Saved the Nim source as UTF-8 (as I always do, even on Windows). Now the file name is correct. But try this for the created file:
for kind, path in walkDir("."):
echo repr path
try:
moveFile(path, "ABC")
except:
echo "nope"
try:
moveFile("tatü2.txt", "DEF")
except:
echo "nope again"
which gives me:
000000000043F050".\\tat\195\1882.txt" nope nope again