utf8-conversions: A conversion library that assumes utf8

[ bsd3, codec, data, library ] [ Propose Tags ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), bytestring (>=0.10.4 && <0.11), text (>=1.0 && <1.3), text-short (>=0.1.2 && <0.1.4), utf8-string (>=1.0 && <1.2) [details]
License BSD-3-Clause
Copyright 2020 Shintaro Sakata
Author Shintaro Sakata
Maintainer Shintaro Sakata
Category Data, Codec
Home page https://github.com/chemirea/utf8-conversions#readme
Bug tracker https://github.com/chemirea/utf8-conversions/issues
Source repo head: git clone https://github.com/chemirea/utf8-conversions
Uploaded by chemirea at 2020-05-09T08:55:20Z
Distributions
Downloads 1008 total (12 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-05-09 [all 1 reports]

Readme for utf8-conversions-0.1.0.0

[back to package description]

utf8-conversions safe and easy

This package provides a Data.Convertible.Utf8 library for easy conversion of many string types in Haskell

Support

  • String
  • ByteString
  • ByteStringBuilder
  • LazyByteString
  • ByteStringShort
  • Text
  • LazyText
  • TextBuilder
  • TextShort

Supports type conversion between the above types. Byte string is assumed to be in utf-8 encoding.

Why?

String conversion in haskell is more difficult than in other languages and needs to be easier.

In particular, the OverloadedStrings pragma does not work properly when creating a ByteString.

So why not other conversion libraries? There are many other conversion libraries that use the Maybe type for safety or are not explicitly stated as utf8.

Libraries that use maybe types are very labor intensive. Libraries that do not explicitly state UTF8 are insecure

Therefore, this library clearly states that it assumes UTF8 and performs the conversion without using the MAYBE type, which is both safe and easy. 。

Get involved!

If there's a bug or a better way to convert, please report it!