stephenhaunts / AzureKeyVault

Sample code for the Azure Key Vault

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Character encoding issues

jeffw-wherethebitsroam opened this issue · comments

Hi Stephen,

I just watched your NDC video. I noticed that in your examples you convert string to bytes using:

Encoding.ASCII.GetBytes()

And then convert bytes to string again using:

Encoding.UTF8.GetString()

While this works find for the english alphabet, as soon as you throw in a few non-acsii characters (like æ,ø and å here in Norway), it will fail. You should use:

Encoding.UTF8.GetBytes()

To convert the string to bytes.

Other than that, interesting video.

Jeff