Skip to content

Conversation

dkabal14
Copy link

I added a way to run the function in objects, so you can bulk remove diacritics from any powershell object, even imported CSV and JSON files

I added a way to run the function in objects, so you can bulk remove diacritics from any powershell object, even imported CSV and JSON files
@pmkochie
Copy link

I added a section to replace the upside down ? and ! used in Spanish and a section to remove extra spaces, can you include this in your official version?
# Normalize the String
$Normalized = $StringValue.Normalize($NormalizationForm)
# Replace the special punctuation characters
$Normalized = $Normalized.Replace("¿", "?")
$Normalized = $Normalized.Replace("¡", "!")
# Remove extra spaces
$Normalized = $Normalized -replace '\s{2,}', ' '

$NewString = New-Object -TypeName System.Text.StringBuilder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants