Reputation: 639
I'm currently outputting a long string through powershell as unicode using the below syntax (reference for doing it this way):
$string | out-file $path -encoding unicode
If I try to import this file in mongo, or another process that can't read UTF8 characters, I get an "Invalid UTF8 character detected." Is this the incorrect syntax?
Upvotes: 1
Views: 525
Reputation: 201832
Unicode is not the same encoding as Utf8. Have you tried -encoding ASCII or -encoding Utf8?
Upvotes: 2