Skip to content

setindex! incorrect for non-UTF-8 strings? #59

@nalimilan

Description

@nalimilan

These two lines don't seem correct to me for non-UTF-8 AbstractString types:

resize!(buffer, l + sizeof(val))
unsafe_copyto!(pointer(buffer, l+1), pointer(val,1), sizeof(val))

Indeed this will copy the contents of the string even if it uses a different encoding from existing data.

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