Text to email appears with wrong characters RRS feed

  • Question

  • Hi!

    I am trying to write some text to an email with Powershell, but the text in the email sais V?xj? instead of Växjö

    How can I correct this? I suppose I can use 0x0XXX or something to tell PowerShell what character i would like to use

    It's just a string, like this: $EmailBody = "Hostname Växjö:"

    And then I send the email: Send-MailMessage -Body $EmailBody


    Monday, September 12, 2016 3:11 PM


  • Hi,

    Add -Encoding Unicode to your Send-MailMessage command.

    • Marked as answer by CesarTabares Monday, September 12, 2016 3:21 PM
    Monday, September 12, 2016 3:16 PM