Skip to content

insert DTO type ENUM as string occurred encode problem #24

@ColdeZhang

Description

@ColdeZhang

I have a ENUM type as string, when I tried to insert it int to DB. Pg report an error "ERROR: invalid byte sequence for encoding "UTF8": 0x00"

It seems like oat++'s ENUM::String have an "\0" at the end of String, but PG's encoding doesn't recognized this char.

One noob solution of this problem is replace "\0" to "" at every String, but I am wondering if there is some more proper solution?

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