April 18th, 2015

PowerTip: Save CSV Data and Maintain Unicode Encoding

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to save data as a CSV file and maintain the Unicode encoding.

Hey, Scripting Guy! Question How can I use Windows PowerShell to save my data as a CSV file but ensure that it is saved as Unicode?

Hey, Scripting Guy! Answer Make sure you specify the –Encoding parameter when you call the Export-CSV cmdlet, for example:

Export-Csv -Path C:\Data\Names.CSV -Encoding Unicode -NoTypeInformation

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.