You should encode the output in the same encoding as the one used in
console (the "codepage"  that info displayed by `chcp`). So for
example:

# encoding: UTF-8
utf8 = ""
puts utf8.encode('cp852')

Obviously console codepages only contain a subset of Unicode. I have
tried to get `chcp 65001` to work with Ruby once, but failed
miserably; unfortunately Windows' console is utterly broken beyond any
repair when it comes to Unicode.

-- Matma Rex