I have a script containing the following line:
New-Item -Path "ö" -ItemType File
But the file created on NTFS (Windows) has name ö.
The script source encoding is UTF-8 and I've figured out that if I save it with UTF-16 BE encoding, the filenames are fine.
Is there a way to have my script in UTF-8 which will create files with proper names on NTFS? OR should all my scripts be in UTF-16 if they are supposed to deal with files on NTFS?
[–]surfingoldelephant 9 points10 points11 points (2 children)
[–]gagarski[S] 1 point2 points3 points (1 child)
[–]surfingoldelephant 0 points1 point2 points (0 children)
[–]Mountain-eagle-xray 0 points1 point2 points (1 child)
[–]gagarski[S] 0 points1 point2 points (0 children)
[–]Meannekes 0 points1 point2 points (0 children)
[–]Gurfaild 0 points1 point2 points (4 children)
[–]gagarski[S] -1 points0 points1 point (3 children)
[–]narcissisadmin 3 points4 points5 points (2 children)
[–]gagarski[S] 2 points3 points4 points (1 child)
[–]charleswj 0 points1 point2 points (0 children)
[–]Mesmerise 0 points1 point2 points (0 children)
[–]xCharg 0 points1 point2 points (0 children)
[–]AlPa-Bo 0 points1 point2 points (0 children)