incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 118791] XMailMessage attachment unusable if file name (ReadableName) contains non-ASCII characters
Date Mon, 16 Jan 2012 12:19:29 GMT

Ariel Constenla-Haile <> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |STARTED
                 CC|                            |
           Platform|PC                          |All
         AssignedTo|          |
     Ever Confirmed|0                           |1
         OS/Version|Windows XP                  |All
           Severity|enhancement                 |normal

--- Comment #1 from Ariel Constenla-Haile <> 2012-01-16 12:19:29 UTC
According to

For each item in the keyword argument dictionary _params, the key is taken as
the parameter name, with underscores converted to dashes (since dashes are
illegal in Python identifiers). Normally, the parameter will be added as
key="value" unless the value is None, in which case only the key will be added.
If the value contains non-ASCII characters, it must be specified as a three
tuple in the format (CHARSET, LANGUAGE, VALUE), where CHARSET is a string
naming the charset to be used to encode the value, LANGUAGE can usually be set
to None or the empty string (see RFC 2231 for other possibilities), and VALUE
is the string value containing non-ASCII code points.

An example with non-ASCII characters:

msg.add_header('Content-Disposition', 'attachment',
               filename=('iso-8859-1', '', 'Fußballer.ppt'))

Which produces

Content-Disposition: attachment; filename*="iso-8859-1''Fu%DFballer.ppt"

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.
View raw message