3

I am running a stock Cygwin install, with the wget package added.

If I run a command

wget -qO- tetristv.com/zapni.tv.php

I get this; notice the incorrect display of characters

session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 1<br><b><a     
href="http://212.80.69.19/stream/vlc.php?id=39&session=OTA5Mjc0ODU5OA==&
stream=play" target="_blank" rel="nofollow">http://212.80.69.19/stream 
/vlc.php?id=39&session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 
2<br><b><a href="http://212.80.69.19/stream/vlc.php?id=40& 
session=OTA5Mjc0ODU5OA==&stream=play" target="_blank" 
rel="nofollow">http://212.80.69.19/stream/vlc.php?id=40&
session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 24<br><b><a 

If I just download the file, everything looks fine in Notepad.

wget tetristv.com/zapni.tv.php
Zombo
  • 1
  • 62
  • 391
  • 407

2 Answers2

3
$ LANG=en_US.CP1252
$ wget -qO- tetristv.com/zapni.tv.php

Result

261&session=NTk1NTg0ODU5OA==&stream=play</a></b><br>#EXTINF:0,Oèko<br><b><a

This also works

wget -qO- tetristv.com/zapni.tv.php | iconv -f cp1252
Zombo
  • 1
  • 62
  • 391
  • 407
0

I'm using stock cygwin in Mintty and have my lang set as LANG=en_US.UTF-8 and it's been working fine for me (unfortunately our proxy server is blocking the site you referenced so I can't test that). Check out Internationalization in the cygwin docs for more help.

Edit: verified that this UTF-8 views properly within mintty:

$ cat /d/temp/test.txt                                                                                                              
Creds Go here®
AlG
  • 14,697
  • 4
  • 41
  • 54
  • Are you using mintty or the modified cmd prompt? I just verified that I'm still properly seeing UTF-8 in mintty. I had a lot of problems getting the character set right in cmd. – AlG Jun 15 '12 at 13:05
  • Odd I know this works fine in Cyg (it used to drive me nutz when it didn't). Are you sure wget is pulling the file correctly? – AlG Jun 15 '12 at 13:52
  • 1
    @svnpenn: Go into the MinTTY options, under Text. Is "UTF-8" selected in the Character Set drop-down? Also, do you have a suitable font selected? I recommend either Lucida Console or DejaVu Sans Mono. Many otherwise good fonts don't have a suitably broad character set for use as a console font, particularly when you get into UTF-8 stuff. – Warren Young Jun 15 '12 at 17:27