ruby-entity-reference README

ruby-html-entities is a Ruby library to convert non-ASCII characters to character entity references in a hope that those characters are properly displayed in HTML pages of non-European encoding.

Installation

$ ruby setup.rb config
$ ruby setup.rb setup
$ su
# ruby setup.rb install

Example

require 'entity-reference'

EntityReference.referenciate("<p>Gr\xfc\xdf Gott</p>", 'html', 'iso-8859-1')
#=> '<p>Gr&uuml;&szlig; Gott</p>'

Resources

License

Copyright (C) 2007 zunda <zunda at freeshell.org>, unless otherwise stated.

The following files are copied from Sections 24.2.1, 24.3.1, and 24.4.1 in <URL:http://www.w3.org/TR/html401/sgml/entities.html>

with portions copyright by International Organization for Standardization 1986 Permission to copy in any form is granted for use with conforming SGML systems and applications as defined in ISO 8879, provided this notice is included in all copies.

To avoid the limitation stated above the tar ball distribution does not include the files listed above.

setup.rb Copyright (C) 2000-2005 Minero Aoki

setup.rb is free software. You can distribute/modify this program under the terms of the GNU LGPL, Lesser General Public License version 2.1.

Contens from the following URLs are copied into test/data to be used for benchmark testing: