Hi Folks,
i'm using the windows.cmd and sublime text to get the output from this lines:
import encodings
echo getCurrentEncoding()
var enc = open(destEncoding=getCurrentEncoding(), srcEncoding="utf-8")
echo enc.convert("ö")
echo "ö"
Sublime gives me the expected result:
windows-1252
[Decode error - output not utf-8]
ö
since sublime utilize utf-8
I thought the windows cmd is using windows-1252 but this seems untrue, cause it gives me:
windows-1252
÷
├Â
any idea what this could be? at least the first line should be printed because i converted it to the M$ encoding?
I'm not really interested into printing to cmd.exe but i want to be shure that the encoding is correct, cause im working on a mime/quotet printables module.
You could do 'chcp 65001' to change the console to utf-8 (needs lucida console font)
See: http://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8
@OderWat: now i see the correct output when echoing utf-8 so far so good!
@flyx:
echo "õ"
echo "ö"
echo "÷"
echo "-------"
echo enc.convert("õ") # 0x00F5 Unicode
echo enc.convert("ö") # 0x00F6 Unicode
echo enc.convert("÷") # 0x00F7 Unicode
gives (again in M$ raster font):
windows-1252
├Á
├Â
├À
-------
§
÷
¸
Interresting, but i think i can live with that for now. Thx!