Text.ConvertUnicodeToCharacterComposition
-----------------------------------------

Converts text by applying unicode character normalization.

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

MBS( "Text.ConvertUnicodeToCharacterComposition"; Text ) 

**MBS**( **"Text.ConvertUnicodeToCharacterComposition";** /\* Converts text by applying unicode character normalization. \*/  
**$Text**) /\* The text to process.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The text to process. | "Hello" |

### Result

Returns text or error.

### Description

Converts text by applying unicode character normalization.  
This function replaces character represented by decomposed representation with the composed representation.  
  
see also   
[https://en.wikipedia.org/wiki/Unicode\_equivalence](https://en.wikipedia.org/wiki/Unicode_equivalence)  
  
Rewritten for version 12.1 to preserve text styles and be quicker.  
### Examples

Test function:

 #some text   
Set Variable \[$text ; Value:"ä ö ü"\]  
\#now make decomposed   
Set Variable \[$decomposedText ; Value:MBS ("[Text.ConvertUnicodeToCharacterDecomposition](TextConvertUnicodeToCharacterDecomposition.md)"; $text )\]  
\#and composed again   
Set Variable \[$composedText ; Value:MBS ("Text.ConvertUnicodeToCharacterComposition"; $decomposedText )\]  
\#Now show results. See the 776 for the Diaeresis?   
Show Custom Dialog \["Result"; $text &amp; " " &amp; MBS ("[Text.Characters](TextCharacters.md)"; $text ) &amp; ¶ &amp; $decomposedText &amp; " " &amp; MBS ("[Text.Characters](TextCharacters.md)…\]  
Test character composition with ä and Char function:

 MBS ("[Text.Characters](TextCharacters.md)"; MBS ( "Text.ConvertUnicodeToCharacterComposition"; Char(97) &amp; Char(776) ))  
<small>  
Example result: 228</small>Test functions:

 Let(\[  
i = "tränenüberströmt";  
r = MBS ( "[Text.ConvertUnicodeToCharacterDecomposition](TextConvertUnicodeToCharacterDecomposition.md)"; i);  
t = MBS ( "[Text.Characters](TextCharacters.md)"; r)  
  
\];  
r &amp; ¶ &amp; t &amp; ¶ &amp;   
"before " &amp; MBS ("[Text.Length](TextLength.md)"; i) &amp; ", after " &amp; MBS ("[Text.Length](TextLength.md)"; r))  
<small>  
Example result:   
tränenüberströmt  
116 114 97 776 110 101 110 117 776 98 101 114 115 116 114 111 776 109 116  
before 16, after 19</small>### See also

- [PDFKit.GetPDFPageText](PDFKitGetPDFPageText.md)
- [Text.Character](TextCharacter.md)
- [Text.Characters](TextCharacters.md)
- [Text.ConvertUnicodeToCharacterDecomposition](TextConvertUnicodeToCharacterDecomposition.md)
- [Text.EncodeURLComponent](TextEncodeURLComponent.md)
- [Text.Length](TextLength.md)

### Release notes

- **Version 12.1**
    - Rewrote [Text.RemoveControlCharacters](https://www.mbsplugins.eu/TextRemoveControlCharacters.shtml), [Text.ConvertUnicodeToCharacterDecomposition](https://www.mbsplugins.eu/TextConvertUnicodeToCharacterDecomposition.shtml) and [Text.ConvertUnicodeToCharacterComposition](https://www.mbsplugins.eu/TextConvertUnicodeToCharacterComposition.shtml) functions to preserve text styles.
- **Version 10.1**
    - Fixed bug with [Text.ConvertUnicodeToCharacterComposition](https://www.mbsplugins.eu/TextConvertUnicodeToCharacterComposition.shtml) function not working for all characters.

### Example Databases

- [Text functions/Unicode Compositions](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Text%20functions/Unicode%20Compositions.shtml#1296FieldAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 12.1pr2](https://www.mbsplugins.de/archive/2022-02-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.1pr4](https://www.mbsplugins.de/archive/2020-02-15/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 3th August 2015 , last changed 31st January 2022

  
[Text.ConvertToTextEncoding](TextConvertToTextEncoding.md) - [Text.ConvertUnicodeToCharacterDecomposition](TextConvertUnicodeToCharacterDecomposition.md)

[HTML Version](TextConvertUnicodeToCharacterComposition.shtml)