latinU

 

One of the common scenarios when importing HR data from a data source using Forefront Identity Manager (FIM), is the need to “normalize” diacritic characters in strings such as name data.   Here is a simple way to accomplish this using only declarative sync rules.

What is a diacritic?

Wikipedia describes them as

 The main use of diacritical marks in the Latin-derived alphabet is to change the sound-value of the letter to which they are added. Examples from English are the diaereses in naïve and Noël

I commonly find them in name data, or location data referring to streets or buildings.

This can be done with classic scripted rules using .NET code, or you can use secondary attributes and workflows to format the data as needed, but in my scenario I wanted to stick with just declarative sync rules.

Using a sync rule in FIM 2010 R2, we have to use the built in functions to identify and replace the diacritic characters with the characters that are acceptable by the system.  Using nested ReplaceString() functions, we can replace multiple characters with the appropriate value we want, but it is not that user friendly when looking at the rule itself as you will see below.

Replacing diacritics in the “Last Name” CS import rule:

ReplaceDiacriticsSyncRuleLastName
The downside with doing this on a per attribute basis, is that if you need to reference that same attribute as a compound attribute flow, you need to repeat the same pattern in the rule

Replacing diacritics in a compound import attribute flow for “DisplayName”:

 

ReplaceDiacriticsSyncRuleDisplayName

Since pasting in such large strings goofed up the format of this post, I used screenshots above.  I attached a Unicode Text file if you want to cut and paste the rule elsewhere.  You can find that here: ReplaceDiacriticSyncRuleExamples

Easier way to generate replace strings:

Typing out all the replace strings is not ideal, so it was easy to generate these from a delimited Unicode encoded file using PowerShell as displayed below. I’ve also attached the replace dictionary on this post as DiacriticsReplace.  Utilize your own replacement dictionary for the values your need.  You can save the output to a Unicode encoded file as well, that way you can easily cut and paste into the actual sync rule.

Generate Replace Strings with PowerShell

Generate Replace Strings with PowerShell