https://github.com/jamescook/is_it_utf8
Fast UTF8 Validator
https://github.com/jamescook/is_it_utf8
ruby utf8
Last synced: 7 months ago
JSON representation
Fast UTF8 Validator
- Host: GitHub
- URL: https://github.com/jamescook/is_it_utf8
- Owner: jamescook
- License: mit
- Created: 2020-01-24T10:42:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T01:01:16.000Z (over 5 years ago)
- Last Synced: 2025-01-28T19:15:43.854Z (9 months ago)
- Topics: ruby, utf8
- Language: C
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IsItUtf8

IsItUtf8 can check if a string contains 100% valid UTF8 - fast. The heavy
lifting is done by [fastvalidate-utf-8](https://github.com/lemire/fastvalidate-utf-8)However, consider simply using `String#valid_encoding?`. Ruby figures our encoding correctness
when strings are instantiated.### Usage
```ruby
require 'is_it_utf8'
puts IsItUtf8.valid?('xøxøxøx')
true
```### Requirements
* Ruby 2.2+
* gcc/clang### Developing
Simply make your changes and re-run the tests. Compilation is automatic.
```
rake test
```### License
MIT