Skip to content

Attachments with Chinese names #635

@rcy1122

Description

@rcy1122

pdfcpu version: v0.4.1 dev
os: macOS Monterey 12.6.2

I added an attached video named 操作.mp4 inside the pdf with the following code:

err := api.AddAttachmentsFile("./content.pdf", "",[]string{"./操作.mp4"}, false, nil)
if err != nil {
    t.Fatal(err)
}

add attachtment file is ok. But read the content.pdf file, receive an error about: pdfcpu: invalid UTF-16BE detected:

pdfCtx, err := api.ReadContextFile("./content.pdf")
if err != nil {
    t.Fatal(err)
}
t.Log(pdfCtx.Creator)

The same video, after modifying the name, can be read.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions