To whom it may concern,
I want to convert my CSV, which is in UTF-8, into UTF-16 using PowerShell. For this task, I wrote the following line of code:
$schuelerCSVUTF8 = Get-Content -Path "C:\tmp\PSProjekt\schueler.csv" | Set-Content -Path "C:\tmp\PSProjekt\lol\schueler.csv" -Encoding Unicode -Force
I see in VS Code that the formatting has correctly changed to UTF-16 LE. But there is a problem.
Some entries get converted correctly:
Before converting, an entry in the CSV looks like this: Z�rcher
.
After converting, it looks like this: Zürcher
.
But others don't:
Before converting, the entry in the CSV looks like this (already correct): Meriç
After converting, it looks like this (now it's false): Meriç
Does anyone know a solution to that or why that happens?