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: 10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2    Statistic    FMM    Blog  

Text.FilterASCII

Filters text to ASCII.

Component Version macOS Windows Linux Server iOS SDK License
Text 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes Free
MBS( "Text.FilterASCII"; Text { ; Replacement } )   More

Parameters

Parameter Description Example Flags
Text The text to process. "Hello 😀 Wörld"
Replacement Replacement text for invalid characters.
Default is empty.
"?" Optional

Result

Returns text or error.

Description

Filters text to ASCII.
Removes all non ASCII characters which can't fit into 7bit.
This function removes those for software, which may not handle them correctly.
We convert 23 variants of curly quotes into ASCII quotes.

See also Text.RemoveControlCharacters and Text.RemoveAccents functions.

Examples

Test with a lot of special characters:

MBS( "Text.FilterASCII"; "` ‘ ’ • \¶ ¨ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ ¼ ½ ¾ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅐ ⅛ ⅜ ⅝ ⅞ ⅑ ⅒ ↉"; "?")

Example result: "` ' ' * ? ? A A A A A A AE C E E E E I I I I D N O O O O O O U U U U Y P s a a a a a a ae c e e e e i i i i d n o o o o o o u u u u y p y 1/4 1/2 3/4 1/3 2/3 1/5 2/5 3/5 4/5 1/6 5/6 1/7 1/8 3/8 5/8 7/8 1/9 1/10 0/3"

See also

Release notes

Blog Entries

Created 8th September 2020, last changed 29th April 2022


Text.FileExtensionToMimeType - Text.FilterUTF16

Feedback: Report problem or ask question.


Start Chat