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
- about 6 years ago
- February 10, 2016
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 01:38:48 GMT
Languages