Skip to content

RString default encoding is ASCII-8Bit #67

@mjc-gh

Description

@mjc-gh

I made a small example to show the "issue". It is available here: https://github.com/mikeycgto/ruru-rstring-encoding#example.

While this isn't incorrect it does feel a little odd since in modern Ruby and Rust both default to UTF-8 encoding.

Perhaps ruby-sys should expose rb_utf8_str_new as well? The RString struct could then maybe have a new_from_utf8 function which will ultimately call this Ruby C function. I can make the necessary PRs but I wanted some feedback first.

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