ashtuchkin / iconv-lite

Convert character encodings in pure javascript.
MIT License
3.08k stars 281 forks source link

"Encoding not recognized: 'UNICODE UTF-8'" #307

Open chenkenkone opened 1 year ago

chenkenkone commented 1 year ago

Hello, can/will iconv-lite support "UNICODE UTF-8"?

Because sending HL7v2 message using hl7v2, and PACS(DUCIM) only recognise UNICODE UTF-8 not utf8 dcm4chee, causing the PACS UI garbled.

ashtuchkin commented 1 year ago

I have no idea what hl7 or dcm4chee is, but can't you just add an if statement that does the conversion? Something like this:

if (encoding === "UNICODE UTF-8")
    encoding = "utf8";

I don't think adding "UNICODE UTF-8" as an official alias to utf-8 makes sense as it's a pretty rare case.