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

Text.FilterUTF16

Filters text to UTF-16.

Component Version macOS Windows Linux Server iOS SDK
Text 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.FilterUTF16"; Text { ; Replacement } )   More

Parameters

Parameter Description Example Flags
Text The text to process. "Hello 😀 World"
Replacement Replacement text for invalid characters.
Default is empty.
"[emoji]" Optional

Result

Returns text or error.

Description

Filters text to UTF-16.
Removes all UTF-32 characters which can't fit into UTF-16.
Normally UTF-32 range characters exceeding the UTF-16 range are stored as two characters in UTF-16.
This function removes those for software, which may not handle them correctly.

Examples

Remove emojis:

MBS( "Text.FilterUTF16"; "Hello 😀 World"; "[emoji]" )

Example result: "Hello [emoji] World"

Filter emojis:

MBS( "Text.FilterUTF16"; "Test 🍎 🍓 🍒"; "?" )

Example result: Test ? ? ?

Release notes

Blog Entries

This function is free to use.

Created 20th June 2019, last changed 31st January 2023


Text.FilterASCII - Text.FindBetween