Warning: リポジトリと同期できません (サポートされていないバージョンコントロールシステム "svn です。 Python のライブラリに "svn" が正しくインストールされているか確認してください。)
- 更新日時:
-
2007/02/16 00:26:56 (19 年 前)
- 更新者:
-
weekbuild (IP アドレス: 218.110.157.68)
- コメント:
-
--
-
|
v2
|
v3
|
|
| 28 | 28 | from email.Header import decode_header |
| 29 | 29 | #from email.Utils import collapse_rfc2231_value |
| 30 | | from email.Utils import decode_rfc2231 |
| | 30 | from email.Utils import unquote |
| 31 | 31 | import types |
| 32 | 32 | |
| … |
… |
|
| 577 | 577 | fallback_charset='us-ascii' |
| 578 | 578 | if isinstance(filename, tuple): |
| 579 | | rawval = self.unquote(filename[2]) |
| | 579 | rawval = unquote(filename[2]) |
| 580 | 580 | charset = filename[0] or 'us-ascii' |
| 581 | 581 | try: |
| … |
… |
|
| 585 | 585 | return unicode(rawval, fallback_charset, errors) |
| 586 | 586 | else: |
| 587 | | return self.decode_to_unicode(self.unquote(value)) |
| 588 | | |
| 589 | | def unquote(self,str): |
| 590 | | """Remove quotes from a string.""" |
| 591 | | if len(str) > 1: |
| 592 | | if str.startswith('"') and str.endswith('"'): |
| 593 | | return str[1:-1].replace('\\\\', '\\').replace('\\"', '"') |
| 594 | | if str.startswith('<') and str.endswith('>'): |
| 595 | | return str[1:-1] |
| 596 | | return str |
| | 587 | return self.decode_to_unicode(unquote(value)) |
| | 588 | |
| 597 | 589 | |
| 598 | 590 | def _delete_message(self,db,id): |