473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Guessing _charset for MIMEText ?

How do I best guess the right (non-UTF, 8bit) default _charset for
MIMEText on an arbitrary computer?

Windows default encoding is quasi : 'mbcs' . No information
locale.getdefaultlocale()[1] #delivers for example:

'cp1252'

but I guess 'cp1252' is not recognized commonly by email-readers, but
'ISO-8859-1' or 'Windows-1252' are usually used for that area.

Robert

PS: side-question: why is there a latin_1.py and a iso8859_1.py in
lib/encodings ? Shouldn't they be the same?

Jan 18 '06 #1
0 985

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Christos TZOTZIOY Georgiou | last post by:
This is a subject that comes up fairly often. Last night, I had the following idea, for which I would like feedback from you. This could be implemented as a function in codecs.py (let's call it...
5
by: Damjan | last post by:
Why doesn't this work: from email.MIMEText import MIMEText msg = MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') msg.set_charset('utf-8') msg.as_string() Traceback (most recent...
4
by: sathyashrayan | last post by:
(This is not a home work question) Dear group, I want a program to find one number between a set of natural number.A program to guess a number in between a Natural number set.This should be a...
4
by: moopower | last post by:
I have to do the following: For this project, you are to create a simple number guessing game. The program should begin by asking the user for a range (i.e. a minimum number and a maximum number)...
0
by: Dale Strickland-Clark | last post by:
The email module's mimetext handling isn't what you might expect from something that appears to behave like a dictionary. $ python Python 2.5 (r25:51908, May 25 2007, 16:14:04) on linux2 Type...
0
by: Dan Upton | last post by:
On Wed, May 21, 2008 at 12:42 PM, garywood <woodygar@sky.comwrote: How about you check tries 10 in the condition for your while loop, and then after the loop you use the value of tries to decide...
0
by: Marcus.CM | last post by:
There is a bug with py2exe when (at least under windows) when importing email # example testmime.py import email msg = email.MIMEText.MIMEText("dsafdafdasfA") print "ok" 1. Save the text...
0
by: Marcus.CM | last post by:
Hi, After some debugging, i found the solution is to :- import email import email.mime.text import email.iterators import email.generator import email.utils
7
by: dseto200 | last post by:
I'm able to create a guessing number game, but I can limit the amount of guesses to less than 3. Can someone tell me what i'm doing wrong? # Guess My Number # The computer picks a random number ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.