#disable all keyboard layouts except english?
3 messages · Page 1 of 1 (latest)
can you share images so i can see more visually what's going on?
Are you looking for something like this?
You can clean up some of them automatically by encode text as Cryllic and then decode it as ascii/utf8
$UserInput = 'Áçčèñţş ůşîñģ dïäçřïţïçš'
Pwsh> RemoveDiacritics -Text $UserInput
# outputs
Accents using diacritics
function RemoveDiacritics {
<#
.SYNOPSIS
Removes diacritics from text, by utilizing Cryillic encoding. Works pretty for no effort.
#>
param(
# text with accents and diacritics
$Text,
# Utf-8 seems to work best? Override if you want something else
[ArgumentCompletions('Utf-8', 'Ascii')]
$DecodeAs = 'Utf-8'
)
$bytes_cry = [Text.Encoding]::GetEncoding('Cyrillic').GetBytes( $Text )
[Text.Encoding]::GetEncoding( $DecodeAs ).GetString( $bytes_cry )
}