Can powershell list the ascii codes and non-ascii codes ?
Can powershell list the ascii codes and non-ascii codes ?
Is this what you mean:
PS E:\> [int][char]"a"
97
PS E:\> [char[]]"some text" |% {[int]$_}
115
111
109
101
32
116
101
120
116
PS E:\>
Or something else?
"IT Staff" wrote:
> Can powershell list the ascii codes and non-ascii codes ?
>
>
>
> .
>
Do you mean this:
PS E:\> [int][char]"a"
97
PS E:\> [char[]]"some text" |% {[int]$_}
115
111
109
101
32
116
101
120
116
or something else?
"IT Staff" wrote:
> Can powershell list the ascii codes and non-ascii codes ?
>
>
>
> .
>
yes
"Rob Campbell" <RobCampbell@newsgroup> wrote in message
news11FE85C-F220-4B24-BE6E-9D296EAB1D6A@newsgroup
> Do you mean this:
>
> PS E:\> [int][char]"a"
> 97
>
> PS E:\> [char[]]"some text" |% {[int]$_}
> 115
> 111
> 109
> 101
> 32
> 116
> 101
> 120
> 116
>
> or something else?
>
> "IT Staff" wrote:
>
>> Can powershell list the ascii codes and non-ascii codes ?
>>
>>
>>
>> .
>>
a-z, A-Z, 0-9, other characters like ~!@#, etc etc, inclusive of blank
space, is there a way of listing it ?
"Rob Campbell" <RobCampbell@newsgroup> wrote in message
news:5CE175ED-D20B-492E-9B37-619C6ED3A1F2@newsgroup
> Is this what you mean:
>
>
> PS E:\> [int][char]"a"
> 97
> PS E:\> [char[]]"some text" |% {[int]$_}
> 115
> 111
> 109
> 101
> 32
> 116
> 101
> 120
> 116
> PS E:\>
>
> Or something else?
>
>
> "IT Staff" wrote:
>
>> Can powershell list the ascii codes and non-ascii codes ?
>>
>>
>>
>> .
>>
Like this?
0..255 |% {write-host "$($_) = $([char]$_)"}
"IT STAFF" wrote:
> a-z, A-Z, 0-9, other characters like ~!@#, etc etc, inclusive of blank
> space, is there a way of listing it ?
>
>
>
>
> "Rob Campbell" <RobCampbell@newsgroup> wrote in message
> news:5CE175ED-D20B-492E-9B37-619C6ED3A1F2@newsgroup>
> > Is this what you mean:
> >
> >
> > PS E:\> [int][char]"a"
> > 97
> > PS E:\> [char[]]"some text" |% {[int]$_}
> > 115
> > 111
> > 109
> > 101
> > 32
> > 116
> > 101
> > 120
> > 116
> > PS E:\>
> >
> > Or something else?
> >
> >
> > "IT Staff" wrote:
> >
> >> Can powershell list the ascii codes and non-ascii codes ?
> >>
> >>
> >>
> >> .
> >>
> .
>
Sorry for the double reply. I couldn't get anything to update until just a
few minutes ago, and thought I'd closed the window without hitting Post on
the first one.
"IT STAFF" wrote:
> yes
>
> "Rob Campbell" <RobCampbell@newsgroup> wrote in message
> news11FE85C-F220-4B24-BE6E-9D296EAB1D6A@newsgroup
>
> > Do you mean this:
> >
> > PS E:\> [int][char]"a"
> > 97
> >
> > PS E:\> [char[]]"some text" |% {[int]$_}
> > 115
> > 111
> > 109
> > 101
> > 32
> > 116
> > 101
> > 120
> > 116
> >
> > or something else?
> >
> > "IT Staff" wrote:
> >
> >> Can powershell list the ascii codes and non-ascii codes ?
> >>
> >>
> >>
> >> .
> >>
> .
>
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unicode or ASCII | Larry__Weiss | PowerShell | 0 | 05 Aug 2009 |
| Re: ASCII or TBCP | IT News | Vista print fax & scan | 2 | 22 Mar 2009 |
| Ascii | collie | VB Script | 1 | 01 Dec 2008 |
| When non-ASCII creeps into script | Marco Shaw | PowerShell | 9 | 16 Nov 2006 |
| Automatic backticking of ASCII control codes in (registry) path na | dreeschkind | PowerShell | 2 | 22 Jun 2006 |