Skip to content

Adding a string and a promise of string give different results. #325

Open
@dduponchel

Description

@dduponchel

When I add a string without the binary option, it is treated as an unicode string.

zip.file("txt", "é");
zip.file("txt").async("text").then((txt) => console.log(txt));
> é

When I add a promise of string without the binary option, it is treated as a binary string.

zip.file("txt", Promise.resolve("é"));
zip.file("txt").async("text").then((txt) => console.log(txt));
> 

Expected: same behavior between the two use cases.

Note to self: also fix the documentation of binary which is quite confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions