chardet.cr v0.1.0
chardet
Crystal bindings for freedesktop.org's uchardet.
Installation
-
Add the dependency to your
shard.yml
:dependencies: chardet: github: elebow/chardet.cr
-
Run
shards install
Usage
require "chardet"
Chardet.detect(unknown_bytes)
# {encoding: "UTF-8"}
The only public interface is Chardet.detect(Bytes)
. It will return a hash with a single element:
encoding
(String
) – The detected encoding of the byte stream
Future versions of uchardet are likely to provide additional fields (see https://gitlab.freedesktop.org/uchardet/uchardet/-/issues/5#note_474963).
Contributing
- Fork it (https://github.com/elebow/chardet.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Eddie Lebow - creator and maintainer
Repository
chardet.cr
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- over 2 years ago
- February 27, 2021
License
MIT License
Links
Synced at
Fri, 22 Nov 2024 01:28:30 GMT
Languages