PowerTip: Save CSV Data and Maintain Unicode Encoding

Doctor Scripto

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

0 comments

Discussion is closed.

Feedback usabilla icon