I have a JavaScript file "test.js" and want to call this file from PowerShell.
test.js file:
async function main() {
console.log("€");
}
main();
When I call the script from cmd I get the correct encoded result like "€"
C:\> node test.js -> €
When I call the script from PowerShell I get a wrong encoded result like "€"
PS C:\> node test.js -> €
When I call the script from PowerShell via cmd I get also a wrong encoded result like "€"
PS C:\> cmd /c node test.js -> €
What can I do the get the correct encoded result "€" in PowerShell?