community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Replacing diacritic characters

Alteryx Partner

Is there a tool to replace these kind of characters

 

ä with a

ü with u

Ä with A

é with e

 

lots of possibilities, i can't find a way to do this.

 

If you're just doing this for a small set of characters, you can easily accomplish via the REPLACE function. As shown below.

 

ReplaceChar([Field], 'ä', 'a')

 

Otherwise a more elegant solution would probably be via a REGEX expression or something.

Alteryx Partner

Hi Daniel thnx for your reply

i need to convert a table with Patients (50.000) for a software migration

it is not allowed to deliver fields with diacritic characters, so the name, address, city etc. fields cannot have characters like ä and ü etc.

the list of characters can be big so i was hoping for a tool which can do the job for me :)

 

 

Alteryx Certified Partner
Alteryx Certified Partner

Try this in a formula:

 

DecomposeUnicodeForMatch([string])

 

 is this better?

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Alteryx Partner

Much better :)

Founder
Founder

The potential problem of DecomposeUnicodeForMatch is that it also converts all characters to lower case and converts chacters like ¼ to 1/4 which may or may not be what you want.  That function was written with the help of the Unicode spec, and its not too hard to roll your own with the same spec.

 

Attached is a module that downloads the raw unicode spec and takes some wholesale assumptions about what you might want and don't want and in the end uses a Find/Replace tool to actually change all the characters.  

Alteryx Certified Partner
Alteryx Certified Partner

Hi,

Having this kind of issues very often with spanish, I created a macro to Find/Replace characters.

In this case, just to convert from unicode to ascii, but if you see the macro, there is a text input to make your own "dictionary" of replacements.

Hope this helps.

Atom

We were having the problem for the report as well.

I did a macro to solve the problem. 

 

Its a combination of Ned and 

Highlighted
Atom

This is excellent!

Helped me a lot with converting polish diacritics characters to neutral. 

I couldn't geocode polish addresses with Google API Alteryx macro because of diacritics characters but with your solution it worked smoothly!

 

Thanks a lot Ned. You made my day!

Labels