Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kostya/encoding-kawai
EncodingKawai - little sintax sugar for ruby force_encoding, also working on 1.8.7.
https://github.com/kostya/encoding-kawai
Last synced: 20 days ago
JSON representation
EncodingKawai - little sintax sugar for ruby force_encoding, also working on 1.8.7.
- Host: GitHub
- URL: https://github.com/kostya/encoding-kawai
- Owner: kostya
- License: mit
- Created: 2012-09-02T17:25:31.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-21T15:42:36.000Z (over 9 years ago)
- Last Synced: 2023-03-11T22:52:28.395Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 141 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
EncodingKawai - little sintax sugar for ruby force_encoding, also working on 1.8.7.
gem 'encoding-kawai'
```ruby
str.utf8! # str.respond_to?(:force_encoding) ? str.force_encoding('utf-8') : str
str.binary! # str.respond_to?(:force_encoding) ? str.force_encoding('binary') : str
```Extend object.
```ruby
require 'encoding-kawai/object'[str1, str2].utf8!
{str1 => str2}.utf8!
...
```