43081j / 43081j/dataview-extra

Issues with decodeURIComponent and UTF-8 Characters

Đang mở
#1 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

When using DataView#getString `decodeURIComponent` will fail with **URI Error: URI Malformed** when first escaping a sequence like "\251art" (Leading Copyright sign, this is the field name of MP4 Metadata for Artist) and then decoding it.

If you simply avoid escaping in the first place it will come out as expected showing the copyright sign.

Can you come up with an example of where this would fail? I could imagine when there are surrogate pairs encoded in UTF-8 it might be failing, but then again I have no test ready to show it.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.