Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

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

💬 Ask a question or report a problem