Lino Website

Documentation · What is Lino? · Applications · TIM Tools

diag.py

This script displays some system settings and prints out a text containing non-ASCII characters. Non-ASCII characters are handled differently (and thus might fail to display correctly) depending on the context and your computer settings.

I wrote this script to test behaviour of frozen console applications with non-ASCII chars. Later I used it again: encoding continued.

Here is what this script should output to the console:

Some sentences in different languages:
 
    Ännchen Müller machte große Augen.
    Cède à César les pâturages reçues.
    Tõesti, ma ütlen teile, see ei ole ükskõik.
 
Overview table with all accented characters:
 
       A E I O U   a e i o u
    ¨  Ä Ë Ø Ö Ü   ä ë ï ö ü
    ~  Ã . . Õ .   ã . . õ .
    ´  Á É Ö à é   á é í ó ú
    `  À È Þ ã ë   à è ì ò ù
    ^  Â Ê × â ê   â ê î ô û
 
Some system settings related to encodings:
 
    locale.getdefaultlocale(): ('de_LU', 'cp1252')
    sys.getdefaultencoding() : cp1252
    sys.getfilesystemencoding() : mbcs
    sys.stdout.encoding : cp850
    sys.stdin.encoding : cp850

Did you see? Some characters are not correctly converted to HTML on the HTML version of this documentation page. An in flagranti proof that this script was worth writing it;-)

(Implemented in Python module diag)

Refering articles:

Copyright 2001-2007 Luc Saffre.
http://lino.saffre-rumma.ee
Generated 2007-06-07 16:23:40