Skip to content

Confusion regarding documentation of fromPtr/fromPtr0 #680

@davidscholberg

Description

@davidscholberg

From my understanding the fromPtr and fromPtr0 functions do not do any validation of the source array contents, and since Text values are internally UTF-8 arrays, if the source array passed to these functions is not valid UTF-8, then bad things can happen somewhere else in the code. Despite this, neither function explicitly says in the docs that no validation is performed nor that valid UTF-8 is expected, and both functions are listed under the Safe conversion functions section.

Is my understanding of the behavior of these functions correct? And if so, should the documentation be updated to make the behavior of these functions and the potential for errors more explicit?

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