mail::account::translatePath

Name

mail::account::translatePath -- Convert readable folder path to internal folder path

Synopsis

std::string folderPath=folder->getPath();

std::string path=account->translatePath(std::string folderPath);

USAGE

This function converts a human-readable representation of a folder's path to the internal folder path in the mail account. For example, IMAP server mailboxes use names encoded in a modified version of the UTF-7 character set, and this method converts a folder path from the application's character set to the modified UTF-7 character set. Specifically:

IMAP

folderPath is converted from application's character set to the modified UTF-7 character set.

SMAP

folderPath is converted from application's character set to UTF-8. The forward slash character, "/" separates names of individual folders in the SMAP hierarchy. Unicode/ISO-10646 characters that cannot be represented in the application's character set may be specified as "%n;", where n is a decimal Unicode value. Use "\/" to specify a forward slash character in the folder name, "\\" to specify a backslash character, and "\%" to specify the "%" character.

mbox mail folders, and maildirs

folderPath is converted from application's character set to modified UTF-7 encoding. The forward slash character, "/" separates names of individual folders in the local mail folder hierarchy. Unicode/ISO-10646 characters that cannot be represented in the application's character set may be specified as "%n;", where n is a decimal Unicode value. Use "\\" to specify a backslash character, and "\%" to specify the "%" character.

RETURN CODES AND CALLBACKS

This function returns the converted path string. An empty string is returned if folderPath is not a valid folder path.

SEE ALSO

mail::account::findfolder(3x), mail::account::folderFromString(3x), mail::setAppCharset(3x).