I have found myself forced to work with Ruby on Windows 7 (Home Premium) and I've been having lots of problems with encoding. As long as I didn't need console input, I was rather good however, but now I'm stymied.

I'm using Powershell ISE and have executed the command `chcp 65001` to make it utf-8. Still my input into ruby programs is incompatible with what's inside Ruby. I've installed Ruby with RubyInstaller 1.9.3.
Okay, what's the problem then?

I've written a short example:

```
# encoding: UTF-8
target = ARGV[0]
puts "string constant ="+ "dupą"
puts "dupą".bytes.to_a.to_s
puts "dupą".encoding
puts "target =" +target
puts target.bytes.to_a.to_s
puts target.encoding
puts target.eql? "dupą"

```

Alright, now let's run this example:

```
PS C:\Users\user\ruby\2> ruby example.rb dupą
string constant =dupą
[100, 117, 112, 196, 133]
UTF-8
target =dup�
[100, 117, 112, 185]
UTF-8
false

```

So the bytes in two identical strings are different, but still they're both recognized as UTF-8. 

Obviously I'm missing something. What am I missing?