PowerTip: Convert to Decimals and Display Unicode Characters

Doctor Scripto

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)


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


Discussion is closed.

Feedback usabilla icon