Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Remove-StringDiacritic.ps1 #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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