encoding_name
EncodingName
Normalizer of encoding name for Crystal (to use it in crystal internal encoder-decoder)
Installation
Add this to your application's shard.yml
:
dependencies:
encoding_name:
github: kostya/encoding_name
Usage
require "encoding_name"
p EncodingName.new("cp-1251").normalize
# => "CP1251"
p EncodingName.new("Windows 1251").normalize
# => "CP1251"
p EncodingName.new("uft8", find_similar: true).normalize
# => "UTF-8"
p EncodingName.new("Unicode").normalize
# => "UTF-8"
p EncodingName.new("asdfdsaf").normalize
# => nil
Repository
encoding_name
Owner
Statistic
- 3
- 0
- 0
- 1
- 1
- over 6 years ago
- February 10, 2016
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 20:27:03 GMT
Languages