haskell / haskell/text

add Latin1 encoder for use with HTTP headers

未关闭
#324 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
feature request
主要语言
Haskell
星标
421
派生
163
PR 合并指标
30 天内没有已合并 PR

描述

Presently there is a function `Data.Text.Encoding.decodeLatin1` which decodes a ByteString as Latin1/ISO-8859-1 text to `Text`.
It would be very helpful to have a corresponding `encodeLatin1` function to assist in writing HTTP header serialization in i.e. Servant.

This would obviously not be a total function as most of Unicode cannot be coded by Latin1, however, it could be made to either throw exceptions or return an `Either` value and still be very helpful.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。