# encoding: utf-8
# api: powershell
# title: Remove diacritics
# description: Remove diacritics from string :
# version: 0.1
# type: function
# author: Grgory Schiro
# license: CC0
# function: Remove-Diacritics
# x-poshcode-id: 5423
# x-archived: 2017-05-17T23:56:42
# x-published: 2017-09-13T23:24:00
#
# PS> Remove-Diacritics -String ‘éàçèöîïñùà’
# eaceoiinua
#
### Grégory Schiro, 2009
### <summary>
### Removes diacritics from string.
### </summary>
### <param name="String">String containing diacritics</param>
function Remove-Diacritics([string]$String)
{
($String.Normalize([Text.NormalizationForm]::FormD)-replace'\p{Mn}').Normalize([Text.NormalizationForm]::FormC)
}