Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Convert to Decimals and Display Unicode Characters

$
0
0

Summary: Use Windows PowerShell to convert hexadecimal values to decimal and display Unicode characters.

Hey, Scripting Guy! Question I found a cool Unicode table on the Internet, but all of the values are displayed as hexadecimal values.
           How can I use Windows PowerShell to translate them to integers and display the Unicode characters?

Hey, Scripting Guy! Answer Use the [Convert] class, call the ToInt32 method, specify the value and 16, and call the [char] class so you
           can convert the character to its Unicode character, for example:

PS C:\> [convert]::ToInt32("2326",16)

8998

PS C:\> [char]8998

Note  Use the Windows PowerShell ISE because the Windows PowerShell console does not always display
Unicode characters properly.

Windows PowerShell, Scripting Guy!, PowerTip


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>