# Inproper encoding?

**URL:** https://forums.powershell.org/t/inproper-encoding/2960
**Category:** PowerShell Help
**Created:** [August 12, 2014, 4:00am UTC](https://forums.powershell.org/t/inproper-encoding/2960 "2014-08-12T04:00:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![joshualeichtman](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joshualeichtman](https://forums.powershell.org/u/joshualeichtman)
#### Post date: [August 12, 2014, 4:00am UTC](https://forums.powershell.org/t/inproper-encoding/2960/1 "2014-08-12T04:00:47Z")

</div>

Paste this into Powershell Prompt (or ISE) and Char returns “å”. Save this as a .ps1 file and executing it and it returns “A¥”.

```auto
$Char = "å"
$Char

```

I’ve tried swathing the encoding but nothing I have tried has worked so far. It doesn’t make sense why PowerShell.exe handles this any differently then a script does.

Any ideas???

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)
#### Post date: [August 12, 2014, 4:14am UTC](https://forums.powershell.org/t/inproper-encoding/2960/2 "2014-08-12T04:14:10Z")

</div>

There are two possibilities that I can think of, off the top of my head. The encoding of your file might not support that character properly, or, if you’re using PowerShell.exe, the console encoding might also be a problem. (Do you get the same results if you run the script from the ISE? It has full unicode support for the console pane.)

---

<div class="post-metadata">

### Author: ![joshualeichtman](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joshualeichtman](https://forums.powershell.org/u/joshualeichtman)
#### Post date: [August 12, 2014, 4:23am UTC](https://forums.powershell.org/t/inproper-encoding/2960/3 "2014-08-12T04:23:55Z")

</div>

I’m running the script in the same window I’m manually inputting the $Char = “å”.

Do you have the same problem if you put the two lines into a script vs pasting it into PowerShell.exe?

Joshua

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 8:47pm UTC](https://forums.powershell.org/t/inproper-encoding/2960/4 "2024-05-16T20:47:38Z")

</div>


