Skip to content

Carpe Diem – Seize the Day

flaphead.com

  • Home
  • HA4
  • Powershell Library
  • weather
  • OSIT
  • WorldClock

Day: August 17, 2017

Using Windows PowerShell to “normalise” a text string

August 17, 2017 by ucinfo, posted in Powershell

Long story, but I  needed a way to normalise a text string.  Say this:

$txt = "Correo electrónico del usuario"

and I found this:

[Text.Encoding]::ASCII.GetString([Text.Encoding]::GetEncoding(1251).GetBytes($txt))

and the result is:

Correo electronico del usuario

Awesome, job done!

Leave a comment
  • About
    • Twitter
    • LinkedIn
    • Entries RSS
    • Comments RSS
    • login
  • About
  • About
    • Twitter
    • LinkedIn
    • Entries RSS
    • Comments RSS
    • login

Calendar

August 2017
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jun   Sep »

Categories

!News !Things2Remember A Month in Exchange BlackBerry DST2007 Exchange Exchange 2010 Fun Gadgets KB Articles Lync Mobile MsExchange MsOffice OCS Powershell Security Training Uncategorized Windows

Blog Stats

  • 111,080 hits

Blogroll

  • gsexdev.blogspot.com
Blog at WordPress.com.
  • Follow Following
    • flaphead.com
    • Already have a WordPress.com account? Log in now.
    • flaphead.com
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar