Skip to content

Module URL::Encode has misleading function name url_encode_utf8 #6

@pali

Description

@pali

Function url_encode_utf8 has utf8 in its name and indicates that it is working with UTF-8 (bytes). Also in documentation is written:

Returns a URL-encoded representation of $string in UTF-8 encoding as an octet string.

But in reality this function expects on its input Unicode $string and not input encoded in UTF-8.

Unicode string is a sequence of ordinals, where each represent one Unicode code point. On the other hand UTF-8 encoded input means sequence of bytes (0...255) and one Unicode code point is represented by one to up to 4 bytes.

So the function name and also in description is misleading.

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