This macro converts Unicode text, such as foreign characters, maths or music symbols, emoji and graphics characters, into an ASCII equivalent.
Inside, the macro is very simple. It is just doing a Find-and-Replace using a lookup table. The table is a tab separated file called TABLE.TSV. This has been copied from AnyAscii, a website and application that does the same job in multiple programming languages. AnyAscii has an open license for business and personal use.
Why would you use this?
- Some systems might have legacy databases (or other storage) that only support ASCII data.
- You might want to convert foreign language characters to make them more readable or joinable, such as place names; For example, the Greek capital theta becomes "Th".
- You could convert emoji in user-generated text so that it can be used for Sentiment Analysis. For example, the red heart emoji becomes "heart", bookended with colons (if it put that, HTML subs in the original emoji).
- You can convert the quarter and half characters to "1/4" and "1/2", which might enable the text to be more useful downstream.
- You could convert olde english Runes to readable text (possibly an edge case).
Note: The macro over-writes the input column, so make a copy of the column if you want to keep the original.
If you find characters that are missing or not in the TABLE.TSV file, you could amend your local copy, or blend in a new file with the missing characters, or let me know and I can add them and update the package. The TABLE.TSV file is (I believe) encoded in UTF-8 and uses tabs to separate fields.
The package contains "Asciify_Harness.yxmd" which is a workflow to demonstrate how to use the macro.
Continuum Jersey is a small but strong consultancy that can accelerate your returns on Alteryx and help you get the most out of it. They have a proven track record of high profile projects with companies ranging from SMEs to blue chip brands, and they specialise in the AI and Financial areas. If you would like to know how Continuum can help you and your company, please visit dub dub dub dot Continuum dot JE, and find the Contact page. They would love to hear from you.