Skip to content

The value obtained after deserializing the bool value using MemoryPackSerializerOptions.Utf16 is incorrect #425

@1641585051

Description

@1641585051

I just want to use unicode encoding and MemoryPackSerializerOptions.Utf16 for may data, but the bool value deserialized by the MemoryPackSerializerOptions.Utf16 Option is wrong. What causes this

var da = Encoding.Unicode.GetString(MemoryPackSerializer.Serialize(false, MemoryPackSerializerOptions.Utf16));
Console.WriteLine(MemoryPackSerializer.Deserialize( Encoding.Unicode.GetBytes(da),MemoryPackSerializerOptions.Utf16));

Outputs:
True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions