Text.DecodeIMAPFolderName
-------------------------

Decodes text from IMAP UTF-7.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [9.2](newinversion92.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.DecodeIMAPFolderName"; Text ) 

**MBS**( **"Text.DecodeIMAPFolderName";** /\* Decodes text from IMAP UTF-7. \*/  
**$Text**) /\* The text in IMAP's modified UTF-7 encoding.e.g. "Test&amp;AOk-" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The text in IMAP's modified UTF-7 encoding. | "Test&amp;AOk-" |

### Result

Returns OK or error.

### Description

Decodes text from IMAP UTF-7.  
Use this for IMAP folder names to decode the name and show to user.  
  
See RFC 2060:  
<http://www.faqs.org/rfcs/rfc2060.html>  
  
You may do a directory listing for IMAP, then decode the names for display, but keep the original encoded names to later do a query for folder content.  
### Examples

Decode Entwürfe:

 MBS ( "Text.DecodeIMAPFolder"; "Entw&amp;APw-rfe" )  
<small>  
Example result: "Entwürfe"</small>Decode Testé&amp;

 MBS ( "Text.DecodeIMAPFolder"; "Test&amp;AOk-&amp;-" )  
<small>  
Example result: "Testé&amp;"</small>Decode path with chinese characters:

 MBS ( "Text.DecodeIMAPFolder"; "~peter/mail/&amp;ZeVnLIqe-/&amp;U,BTFw-" )  
<small>  
Example result: "~peter/mail/日本語/台北"</small>### Release notes

- **Version 9.2**
    - Added [Text.DecodeIMAPFolderName](http://www.mbsplugins.eu/TextDecodeIMAPFolderName.shtml) function.

### Blog Entries

- [Was gibt es neues bei MBS Version 9.2](https://www.mbsplugins.de/archive/2019-07-16/Was_gibt_es_neues_bei_MBS_Vers/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.2pr1](https://www.mbsplugins.de/archive/2019-04-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th March 2019 , last changed 14th December 2021

  
[Text.DecodeHexFromBase64](TextDecodeHexFromBase64.md) - [Text.DecodeURLComponent](TextDecodeURLComponent.md)

[HTML Version](TextDecodeIMAPFolderName.shtml)