• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Decoding Internationalised Email Headers

    August 10th, 2010
    email, python  [html]
    Every so often someone will email me something where the subject has unicode in it. My naive tools don't know what to do with it, and I see stuff like:
    =?UTF-8?Q?[Sociological_Images]_New_Comment_On:_Satter=E2=80=99s_Hierarch?=  =?UTF-8?Q?y_of_Food_Needs?=
    It turns out python has a module for this, providing email.header.decode_header. This gives me:
    [Sociological_Images] New Comment On: Satter's Hierarchy of Food Needs
    So much nicer.

    I am continually happily surprised at the fraction of the time that what I want is already implemented in the python standard library.

    Comment via: facebook

    Recent posts on blogs I like:

    It's ok to feed stray cats

    Before we had kids, Jeff and I fostered a couple of cats. One had feline AIDS and was very skinny. Despite our frugal grocery budget of the time, I put olive oil on her food, determined to get her healthier. I knew that stray cats were not a top global pr…

    via Giving Gladly May 15, 2021

    Collections: Teaching Paradox, Europa Universalis IV, Part III: Europa Provincalis

    This is the third part of our series (I, II) examining the historical assumptions of Paradox Interactive’s grand strategy computer game set in the early modern period, Europa Universalis IV (which is in turn the start of a yet larger series looking at sev…

    via A Collection of Unmitigated Pedantry May 14, 2021

    Randal O’Toole Gets High-Speed Rail Wrong

    Now that there’s decent chance of US investment in rail, Randal O’Toole is resurrecting his takes from the early Obama era, warning that high-speed rail is a multi-trillion dollar money sink. It’s not a good analysis, and in particular it gets the reality…

    via Pedestrian Observations May 12, 2021

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact