Skip to content

Commit e0d7556

Browse files
committed
first pass of EncodingCodepoint
1 parent 3b89aa0 commit e0d7556

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

Pwsh/Unicode/ExperimentingWithUnicodeCodepoint-andCharset.ps1

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@ $enc_winX.GetEncoding()|Ft
1111

1212

1313

14-
$Rune = 'ë'
14+
$Rune = 'ë '
1515
# return an object of before and after encoding the character for ervery encoding
1616

1717

1818
# $_ -is [EncodingInfo]
1919
# $curEnc -is [Encoding]
2020
$query = $enc_winX.ForEach({
2121
$curEnc = $_.GetEncoding()
22-
23-
2422
$Bytes = $curEnc.GetBytes( $Rune )
2523

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

3432
Before = $Rune
33+
Enc_TypeName = $curEnc.GetType().FullName
3534
}
3635

37-
38-
39-
# Enc_ = $encCur.CodePage
40-
# Enc_Type = $encCur.GetType().fullname
41-
42-
43-
44-
# }
36+
[pscustomobject]$info
4537
})
4638

47-
$query | Ft -auto
39+
$query
40+
| Ft -auto

0 commit comments

Comments
 (0)