Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonytonyjan/rfc_2047
A Ruby implementation of RFC 2047
https://github.com/tonytonyjan/rfc_2047
rfc2047 ruby
Last synced: about 1 month ago
JSON representation
A Ruby implementation of RFC 2047
- Host: GitHub
- URL: https://github.com/tonytonyjan/rfc_2047
- Owner: tonytonyjan
- Created: 2020-10-18T16:00:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-18T16:38:17.000Z (about 4 years ago)
- Last Synced: 2024-11-11T13:08:59.597Z (about 1 month ago)
- Topics: rfc2047, ruby
- Language: Ruby
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rfc_2047
It is a Ruby implementation of [RFC 2047][rfc 2047], which is more accurate and fault-tolerant than [ConradIrwin/rfc2047-ruby](https://github.com/ConradIrwin/rfc2047-ruby). The former can encode, decode, and handle charset correctly, while the latter only implement decoding function.
## Installation
```
gem install new_rfc_2047
```## Usage
```ruby
Rfc2047.encode('己所不欲,勿施於人。')
# => "=?UTF-8?B?5bex5omA5LiN5qyy77yM5Yu/5pa95pa85Lq644CC?="
Rfc2047.decode '=?UTF-8?B?5bex5omA5LiN5qyy77yM5Yu/5pa95pa85Lq644CC?='
# => "己所不欲,勿施於人。"
```[rfc 2047]: https://www.ietf.org/rfc/rfc2047.txt