Guessing _charset for MIMEText ?

Discussion in 'Python' started by Robert, Jan 18, 2006.

  1. Robert

    Robert Guest

    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?
     
    Robert, Jan 18, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Irmen de Jong
    Replies:
    1
    Views:
    775
    Irmen de Jong
    Jan 18, 2004
  2. Christos TZOTZIOY Georgiou

    An attempt at guessing the encoding of a (non-unicode) string

    Christos TZOTZIOY Georgiou, Apr 2, 2004, in forum: Python
    Replies:
    12
    Views:
    655
    Christos TZOTZIOY Georgiou
    Apr 7, 2004
  3. Damjan

    Unicode in MIMEText

    Damjan, Nov 24, 2005, in forum: Python
    Replies:
    5
    Views:
    711
    Damjan
    Nov 28, 2005
  4. sathyashrayan

    Finding the square root and guessing the number

    sathyashrayan, Apr 22, 2006, in forum: C Programming
    Replies:
    4
    Views:
    554
    Mark McIntyre
    Apr 22, 2006
  5. Dale Strickland-Clark

    MIMEText breaking the rules?

    Dale Strickland-Clark, Aug 1, 2007, in forum: Python
    Replies:
    2
    Views:
    403
    Dale Strickland-Clark
    Aug 6, 2007
  6. Marcus.CM

    py2exe bug with email.MIMEText

    Marcus.CM, Aug 1, 2008, in forum: Python
    Replies:
    0
    Views:
    335
    Marcus.CM
    Aug 1, 2008
  7. neubyr
    Replies:
    0
    Views:
    319
    neubyr
    Sep 6, 2011
  8. Adam W.
    Replies:
    3
    Views:
    247
    Terry Reedy
    Feb 26, 2013
Loading...