Skip to content

Commit

Permalink
first pass of EncodingCodepoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey committed May 16, 2024
1 parent 3b89aa0 commit e0d7556
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Pwsh/Unicode/ExperimentingWithUnicodeCodepoint-andCharset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ $enc_winX.GetEncoding()|Ft



$Rune = 'ë'
$Rune = 'ë '
# return an object of before and after encoding the character for ervery encoding


# $_ -is [EncodingInfo]
# $curEnc -is [Encoding]
$query = $enc_winX.ForEach({
$curEnc = $_.GetEncoding()


$Bytes = $curEnc.GetBytes( $Rune )

$info = [ordered]@{
$info = [ordered]@{
Enc_Codepage = $_.CodePage
Enc_Name = $_.Name
Enc_Display = $_.DisplayName
Expand All @@ -32,16 +30,11 @@ $query = $enc_winX.ForEach({
| Join-String -f '{0:x}' -sep ' '

Before = $Rune
Enc_TypeName = $curEnc.GetType().FullName
}



# Enc_ = $encCur.CodePage
# Enc_Type = $encCur.GetType().fullname



# }
[pscustomobject]$info
})

$query | Ft -auto
$query
| Ft -auto

0 comments on commit e0d7556

Please sign in to comment.