ANSEL::Iconv is a wrapper for Iconv that adds ANSEL character set conversion.
- Project page: http://github.com/infused/ansel_iconv
- API Documentation: http://rubydoc.info/github/infused/ansel_iconv/frames
- Report bugs: http://github.com/infused/ansel_iconv/issues
- Questions? Email firstname.lastname@example.org with ANSEL::Iconv in the subject line
ANSEL::Iconv is compatible with Ruby 1.8.6, 1.8.7, 1.9.2, and 1.9.3. Ruby must be compiled with iconv support.
gem install ansel_iconv
Conversion from ANSEL to any other encoding is fully supported, but you cannot convert to ANSEL from another encoding. Two-way encoding may be added in the future.
require 'ansel_iconv' # convert ANSEL to UTF-8 converter = ANSEL::Iconv.new 'UTF-8' converter.iconv("\xB9\x004.59") # => "£4.59"
You can use ANSEL::Iconv as a replacement for the built-in Iconv, because non-ANSEL conversions are simply passed through to Iconv.
# convert UTF-8 to UTF-16 converter = ANSEL::Iconv.new 'UTF-16', 'UTF-8' converter.iconv("£4.59") # => "\376\377\000\243\0004\000.\0005\0009"
About the ANSEL character set
ANSI/NISO Z39.47, also known as ANSEL, is a character set encoding used primarily for bibliographic and genealogical data. It is one of the official character encodings supported by the Gedcom 5.5 standard.
Copyright (c) 2006-2014 Keith Morrison email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.