Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Text.ConvertUnicodeToCharacterDecomposition

Converts text by applying unicode character normalization.

Component Version macOS Windows Linux Server iOS SDK
Text 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.ConvertUnicodeToCharacterDecomposition"; Text )   More

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 one unicode character by the decomposed variant.

see also
https://en.wikipedia.org/wiki/Unicode_equivalence

Rewritten for version 12.1 to preserve text styles and be quicker.

Examples

Test function with ä:

MBS("Text.Characters"; MBS( "Text.ConvertUnicodeToCharacterComposition"; Char(97) & Char(776) ))

Example result: 228

Test with ä as 228:

MBS("Text.Characters"; MBS( "Text.ConvertUnicodeToCharacterDecomposition"; Char(228) ))

Example result: 97 776

Test functions:

Let([
i = "tränenüberströmt";
r = MBS( "Text.ConvertUnicodeToCharacterDeComposition"; i);
t = MBS( "Text.Characters"; r);
x = MBS( "Text.ConvertUnicodeToCharacterComposition"; r);
tr= MBS( "Text.Characters"; x)

];
r & ¶ & t &¶& x & ¶ &
"before " & MBS("Text.Length"; i) & ", middle " & MBS("Text.Length"; r) & ", after " & MBS("Text.Length"; x) & ¶ & tr)

Example result:
tränenüberströmt
116 114 97 776 110 101 110 117 776 98 101 114 115 116 114 111 776 109 116
tränenüberströmt
before 16, middle 19, after 16
116 114 228 110 101 110 252 98 101 114 115 116 114 246 109 116

Mount with properly encoding french accent:

Set Variable [ $path; Value: MBS( "Files.Mount"; "afp://stockage.madabout.lu/" & MBS( "Text.EncodeURLComponent"; MBS( "Text.ConvertUnicodeToCharacterDecomposition"; "Travail archivé" )); "UTF-8" )) ]

# URL is "afp://test.myserver.local/Travail%20archiv%8E"

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 3th August 2015, last changed 4th March 2022


Text.ConvertUnicodeToCharacterComposition - Text.CountWords