Unicode Folder Names Support
hsanson at gmail.com
Sun Mar 21 11:18:05 GMT 2010
On Sun, Mar 21, 2010 at 12:15:57PM +0900, Horacio Sanson wrote:
> I just started using offlineimap and I can tell my mutt client is
> lighting fast. There is just a single problem, that I have Japanese
> named folders and they look like: "&MLkwrTDrMKIwwzDXMLgw4zDRMPM-"
> This is a known problem, see here:
> I was looking at the documentation and found the nametrans option rather
> interesting. I new to offlineimap and I have no idea about python so I
> would like to ask the experts, before I delete my IMAP folders, if it is
> possible to use this feature to convert the garbled folder names to
> something that mutt can display correctly?
> Something like (remember I have no clue how to use Python):
> nametrans = lambda foldername: re.sub('any folder', 'to_utf8(foldername)', foldername)
I got something working that fixed my problem, see link below for
details, but is an ugly hack that requires modification of the
offlineimap python code to add conversion from the IMAP4 UTF-7 encoding to
I would like to get some help here to integrate my code better with
offlineimap. The ideal would be to convert all IMAP folder names from
UTF-7 to a default, maybe UTF-8, encoding when manipulating local
repositories. Even more ideal would be to add an option to the
configuration file that would allow users to select their desired
encoding to handle all folders in the local repository.
I am afraid my python knowledge is below zero but no so my programming
skill. All I need to know is exactly were is the best place to add my
UTF-7 to UTF-8 coversion code and where is the best place to perform the
conversion without breaking the folderfilter and nametrans mechanisms. or
any other part of offlineimap.
Here is a blog post on my little solution:
More information about the OfflineIMAP-project