Fdawgs/docsmith

Drop support for returning non-UTF-8 encoded responses

Closed this issue · 0 comments

The /pdf/html and /pdf/txt routes both support the option to produce non-UTF-8 encoded results via the outputEncoding query string param:

.prop(
"outputEncoding",
S.string()
.default("UTF-8")
.description("Sets the encoding to use for text output")
// Encodings supported by Poppler
.enum([
"ASCII7",
"Big5",
"Big5ascii",
"EUC-CN",
"EUC-JP",
"GBK",
"ISO-2022-CN",
"ISO-2022-JP",
"ISO-2022-KR",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
"KOI8-R",
"Latin1",
"Latin2",
"Shift-JIS",
"TIS-620",
"UTF-8",
"UTF-16",
"Windows-1255",
"ZapfDingbats",
])
)

However, these are legacy encodings, W3C recommends using UTF-8 for everything, and the HTML standard reflects this.

These encodings are also not tested in this repo so cannot confirm the correctness of the output, and I have yet to encounter any use-case for them in any modern clinical setting.