<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
It seems you did not incorporate the fix I submitted on 7/17/2013.<br>
<br>
It addresses mapping between folder names that use Unicode
character.<br>
This was necessary in particular to deal with Exhange migration
where folders may contain dots.<br>
<br>
I decided to adopt the solution to convert '.' to Unicode <span
class="st">MIDDLE <em>DOT</em>' (U+00B7), which looks similar.<br>
I wrote nametrans functions that encode the names in mUTF-7, as
used by IMAP.<br>
</span><br>
The nametrans and the separator replacement are not commutative
operations, hence they must be performed in inverse order depending
on the direction.<br>
More precisely, one must do first nametrans and then replace on the
source repository, for example:<br>
<br>
# Transform, replace:<br>
a/b.c -> a/b&ALc-c -> a.b&ALc-c<br>
<br>
while replace and then nametrans in the reverse direction:<br>
<br>
# Replace, transform:<br>
a.b&ALc-c -> a/b&ALc-c -> a/b.c<br>
<br>
This requires the following change to sync_folder_structure(), in
Base.py:<br>
<br>
src_hash = {}<br>
for folder in src_folders:<br>
# Transform, replace:<br>
# a/b.c -> a/b&ALc-c -> a.b&ALc-c<br>
src_hash[folder.getvisiblename().replace(<br>
src_repo.getsep(), dst_repo.getsep())] = folder<br>
dst_hash = {}<br>
for folder in dst_folders:<br>
# Replace, transform:<br>
# a.b&ALc-c -> a/b&ALc-c -> a/b.c<br>
src_name = folder.name.replace(<br>
dst_repo.getsep(), src_repo.getsep())<br>
src_name = folder.repository.nametrans(src_name)<br>
dst_hash[src_name] = folder<br>
<br>
Note that this entails that all transformations be done in the space
of the source repository.<br>
The documentation page <a class="moz-txt-link-freetext"
href="http://docs.offlineimap.org/en/latest/nametrans.html">http://docs.offlineimap.org/en/latest/nametrans.html</a><br>
says that the mapping should use the separator of the repository,
without specifying which.<br>
It should always read the source repository for both the direct and
reverse nametrans.<br>
<br>
Let me know if you need further explanations.<br>
<br>
Thank you<br>
<br>
Giuseppe Attardi<br>
Università di Pisa<br>
<br>
</body>
</html>