[Tutor] slashes in paths

eryksun eryksun at gmail.com
Mon Jul 22 20:23:34 CEST 2013


On Mon, Jul 22, 2013 at 1:47 PM, Jim Mooney <cybervigilante at gmail.com> wrote:
> I forgot about TREE. But figured piping C:\Python27>tree /f > pytree.txt
> might be illuminating. I piped since it took forever to print because I have
> python(x,y). Unfortunately, I got tiny numbers and A with umlauts instead of
> the nice path outlines in the dos box:
>
> ³   ³   ³   ³   ÀÄÄÄtests

I assume you're using U.S. code pages. In the console run

    more pytree.txt

Then run

    chcp 1252
    more pytree.txt

The OEM codepage is 437. The lower 7-bit range is ASCII, but what do
with the upper half of the 8-bit range wasn't standardized in the 80s.
IBM used it for an assortment of letters, symbols, and drawing
characters:

http://en.wikipedia.org/wiki/Code_page_437#Standard_code_page
http://en.wikipedia.org/wiki/Box-drawing_characters

For Windows, Microsoft no longer needed the drawing characters, so
they switched to code pages that extended ISO character sets, such as
Window 1252 (extends Latin-1)

http://en.wikipedia.org/wiki/Code_page_1252

That's the default encoding if you open a text file with notepad.


More information about the Tutor mailing list