diff options
Diffstat (limited to 'maildir')
| -rw-r--r-- | maildir/maildirinfo.c | 29 | ||||
| -rw-r--r-- | maildir/maildirinfo.h | 2 | ||||
| -rw-r--r-- | maildir/maildirmake.sgml | 4 |
3 files changed, 16 insertions, 19 deletions
diff --git a/maildir/maildirinfo.c b/maildir/maildirinfo.c index 95f3837..5db7f89 100644 --- a/maildir/maildirinfo.c +++ b/maildir/maildirinfo.c @@ -418,12 +418,12 @@ int maildir_info_imap_find(struct maildir_info *info, const char *path, /***************************************************************************/ /* -** Maildir folders are named in IMAP-compatible modified-UTF7 encoding, +** Maildir folders are named in IMAP-compatible modified-UTF8 encoding, ** with periods as hierarchy delimiters. One exception: ".", "/", "~", and -** ":" are also encoded using modified-UTF7, making folder names that contain +** ":" are also encoded using modified-UTF8, making folder names that contain ** those characters incompatible with IMAP. ** -** smaptoUtf7 crates a modified-UTF7-encoded folder name from a vector +** smap_to_utf8 crates a modified-UTF8-encoded folder name from a vector ** of UTF-8 words. ** ** input: "INBOX" "a" "b" @@ -431,7 +431,7 @@ int maildir_info_imap_find(struct maildir_info *info, const char *path, ** */ -static char *smaptoUtf7(char **ptr) +static char *smap_to_utf8(char **ptr) { char *f=NULL; char *n; @@ -439,8 +439,8 @@ static char *smaptoUtf7(char **ptr) while ((n=*ptr++) != NULL && *n) { char *p=unicode_convert_tobuf(n, "utf-8", - unicode_x_imap_modutf7 " ./~:", - NULL); + unicode_x_smap_modutf8, + NULL); if (!p) { @@ -471,15 +471,13 @@ static char *smaptoUtf7(char **ptr) } /* -** Legacy IMAP creates maildir folders using modified-UTF7. -** -** Convert modified-UTF7 folder name into an array of UTF-8 words, that +** Convert modified-UTF8 folder name into an array of UTF-8 words, that ** represent a folder name. */ -char **maildir_smapfn_fromutf7(const char *modutf7) +char **maildir_smapfn_fromutf8(const char *modutf8) { - char *p=strdup(modutf7), *q; + char *p=strdup(modutf8), *q; size_t n, i; char **fn; @@ -513,8 +511,8 @@ char **maildir_smapfn_fromutf7(const char *modutf7) } fn[n]=unicode_convert_tobuf(q, - unicode_x_imap_modutf7 " ./~:", - "utf-8", NULL); + unicode_x_smap_modutf8, + "utf-8", NULL); q += i; if (!fn[n]) @@ -558,7 +556,7 @@ static void get_existing_callback(const char *f, void *vp) if (gefi->pathname) return; - fn=maildir_smapfn_fromutf7(f); + fn=maildir_smapfn_fromutf8(f); if (!fn) { perror(f); @@ -601,7 +599,7 @@ static char *smap_path(const char *homedir, char *n, *p; struct stat stat_buf; - if ((n=smaptoUtf7(words)) == NULL) + if ((n=smap_to_utf8(words)) == NULL) return NULL; p=maildir_name2dir(homedir, n); @@ -935,4 +933,3 @@ static size_t munge_complex(const char *orig, char *n) if (n) *n=0; return cnt+1; } - diff --git a/maildir/maildirinfo.h b/maildir/maildirinfo.h index 418b81c..b8f4d47 100644 --- a/maildir/maildirinfo.h +++ b/maildir/maildirinfo.h @@ -64,7 +64,7 @@ extern int maildir_info_suppress(const char *maildir); int maildir_info_smap_find(struct maildir_info *info, char **folder, const char *myid); -char **maildir_smapfn_fromutf7(const char *modutf7); +char **maildir_smapfn_fromutf8(const char *modutf8); void maildir_smapfn_free(char **fn); /* diff --git a/maildir/maildirmake.sgml b/maildir/maildirmake.sgml index e60ef61..6ad9aaa 100644 --- a/maildir/maildirmake.sgml +++ b/maildir/maildirmake.sgml @@ -69,9 +69,9 @@ existing maildir.</simpara> that the folder's name is given using the system locale's character set. Non-Latin characters in the folder's name must be given to the <literal>-f</literal> option using IMAP's - modified-UTF7 encoding. The <literal>-F</literal> option + UTF8 encoding. The <literal>-F</literal> option takes the folder name specified using the console's character - set..</simpara> + set.</simpara> </listitem> </varlistentry> |
