Skip to content

Unicode support for Response::download #2305

Closed
@blamh

Description

When using non-ascii characters for the filename in Response::download an InvalidArgumentException will be raised with the text The filename fallback must only contain ASCII characters. in ResponseHeaderBag.php:266.

Apparently only ascii characters are valid for the filename. Why can this be? Should unicode not be allowed? Why put in this barrier?

    // filenameFallback is not ASCII.
    if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) {
        throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.');
    }

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