Skip to content

Character encoding issues #1

@jeffw-wherethebitsroam

Description

@jeffw-wherethebitsroam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions