A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/023871.html below:

[Python-Dev] Unicode howto in the works

[Python-Dev] Unicode howto in the works - feedback appreciated [Python-Dev] Unicode howto in the works - feedback appreciatedBarry A. Warsaw barry@zope.com
Wed, 1 May 2002 13:59:12 -0400
[Email]

A Stephen Turnbull says, if there's no charset, you must assume it's
us-ascii.  Here's an (untested) example using the email package:

    import email

    msg = email.message_from_string(...)
    if msg.get_main_type() == 'text':
	charset = msg.get_param('charset', 'us-ascii')
    else:
	charset = NotAppropriate

-Barry




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4