nokogiri 1.6.6.4 → 1.6.7.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.cross_rubies +7 -5
  3. data/.travis.yml +33 -30
  4. data/CHANGELOG.ja.rdoc +15 -18
  5. data/CHANGELOG.rdoc +12 -15
  6. data/Gemfile +2 -1
  7. data/LICENSE.txt +31 -0
  8. data/Manifest.txt +4 -24
  9. data/README.md +170 -0
  10. data/Rakefile +24 -22
  11. data/appveyor.yml +22 -0
  12. data/build_all +6 -90
  13. data/ext/nokogiri/extconf.rb +29 -31
  14. data/ext/nokogiri/xml_node.c +21 -11
  15. data/lib/nokogiri/version.rb +1 -1
  16. data/lib/nokogiri/xml/node.rb +16 -0
  17. data/{ports/patches → patches}/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch +0 -0
  18. data/{ports/patches → patches}/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch +0 -0
  19. data/{ports/patches → patches}/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch +0 -0
  20. data/{ports/patches → patches}/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch +0 -0
  21. data/{ports/patches → patches}/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch +0 -0
  22. data/{ports/patches → patches}/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch +0 -0
  23. data/{ports/patches → patches}/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch +0 -0
  24. data/{ports/patches → patches}/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch +0 -0
  25. data/{ports/patches → patches}/libxslt/0008-Fix-direct-pattern-matching.patch +0 -0
  26. data/{ports/patches → patches}/libxslt/0009-Fix-certain-patterns-with-predicates.patch +0 -0
  27. data/{ports/patches → patches}/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch +0 -0
  28. data/{ports/patches → patches}/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch +0 -0
  29. data/{ports/patches → patches}/libxslt/0014-Fix-for-bug-436589.patch +0 -0
  30. data/{ports/patches → patches}/libxslt/0015-Fix-mkdir-for-mingw.patch +0 -0
  31. data/{ports/patches → patches}/sort-patches-by-date +0 -0
  32. data/test/html/test_document.rb +21 -3
  33. data/test/xml/sax/test_parser.rb +11 -0
  34. data/test/xml/test_document.rb +11 -0
  35. data/test_all +3 -3
  36. metadata +79 -71
  37. data/README.ja.rdoc +0 -112
  38. data/README.rdoc +0 -177
  39. data/ports/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch +0 -32
  40. data/ports/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch +0 -49
  41. data/ports/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch +0 -177
  42. data/ports/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch +0 -32
  43. data/ports/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch +0 -28
  44. data/ports/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch +0 -31
  45. data/ports/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch +0 -64
  46. data/ports/patches/libxslt/0016-Fix-for-type-confusion-in-preprocessing-attributes.patch +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1587aee5e8349fb69b32edab60adb3cca21227dd
4
- data.tar.gz: 2827b6fde906ec74e2ab3e621943c6d5cd4cbf48
3
+ metadata.gz: c732038b7cbf3bd702bb75173453260302c33fc4
4
+ data.tar.gz: edde1b0fb8377b7f397f4c1acc475aa37730470d
5
5
  SHA512:
6
- metadata.gz: a9d7f11af4d7eff36a166b23d9422358cd3c609c59a2c2d6a2d243c247ece98a4e1797bcefc5fe409bfae41eb0eb5970dab86e0b21ad99da025aa07846c79fc8
7
- data.tar.gz: 998b77a82ae47d9215bac769b4c758434aeee595abd86ff87190636bf8a936321af032562b045b54f88ae2d4b1393d8442ce8b0114c1c32d6450a456e6323a74
6
+ metadata.gz: 5089b1d372b425c161ad2d10387d6da413cc47f46bfde949521576a63b599402dbf50fb3d02f62b5cff9b21c5a8f2c1003d11ac9ea9d3e027366ed8acf179238
7
+ data.tar.gz: 9fb2ed0edf093eda038337e152fe28603746177db2f35457b9d585a256f0a356f01e86fb440d32da52048abba60e03aaea0a111436fdebcff26086defb7b8270
@@ -1,5 +1,7 @@
1
- 1.9.3-p547:i586-mingw32msvc
2
- 2.0.0-p576:i686-w64-mingw32
3
- 2.0.0-p576:x86_64-w64-mingw32
4
- 2.1.3:i686-w64-mingw32
5
- 2.1.3:x86_64-w64-mingw32
1
+ 1.9.3-p551:i586-mingw32msvc
2
+ 2.0.0-p645:i686-w64-mingw32
3
+ 2.0.0-p645:x86_64-w64-mingw32
4
+ 2.1.6:i686-w64-mingw32
5
+ 2.1.6:x86_64-w64-mingw32
6
+ 2.2.2:i686-w64-mingw32
7
+ 2.2.2:x86_64-w64-mingw32
@@ -1,38 +1,41 @@
1
1
  language: ruby
2
2
 
3
+ sudo: false
4
+
3
5
  rvm:
4
- - ruby-1.9.2
5
- - ruby-1.9.3
6
- - ruby-2.0
7
- - ruby-2.1
8
- - ruby-2.2
9
- - jruby-19mode
10
- - jruby-1.7.18
11
- - jruby-9.0.0.0.pre1
12
- - rbx-19mode
13
- - rbx-2
6
+ - ruby-1.9.2
7
+ - ruby-1.9.3
8
+ - ruby-2.0.0
9
+ - ruby-2.1.7
10
+ - ruby-2.2.2
11
+ - jruby-19mode
12
+ - jruby-1.7.22
13
+ - jruby-9.0.0.0
14
+ - rbx-19mode
15
+ - rbx-2
14
16
 
15
17
  os:
16
- - linux
17
- - osx
18
+ - linux
19
+ - osx
18
20
 
19
21
  matrix:
20
- allow_failures:
21
- - os: osx
22
- - rvm: jruby-9.0.0.0.pre1
23
-
24
22
  exclude:
25
- - os: osx
26
- rvm: ruby-1.9.2
27
- - os: osx
28
- rvm: ruby-2.2
29
- - os: osx
30
- rvm: jruby-19mode
31
- - os: osx
32
- rvm: jruby-1.7.18
33
- - os: osx
34
- rvm: jruby-9.0.0.0.pre1
35
- - os: osx
36
- rvm: rbx-19mode
37
- - os: osx
38
- rvm: rbx-2
23
+ - os: osx
24
+ rvm: ruby-1.9.2
25
+ - os: osx
26
+ rvm: jruby-19mode
27
+ - os: osx
28
+ rvm: jruby-1.7.22
29
+ - os: osx
30
+ rvm: jruby-9.0.0.0
31
+ - os: osx
32
+ rvm: rbx-19mode
33
+ - os: osx
34
+ rvm: rbx-2
35
+
36
+ notifications:
37
+ irc:
38
+ channels:
39
+ - "chat.freenode.net#nokogiri"
40
+ use_notice: true
41
+ skip_join: true
@@ -1,30 +1,26 @@
1
- === 1.6.6.4 / 2015-11-19
1
+ === 1.6.7.rc2 / 2015年08月31日
2
2
 
3
- This version pulls in an upstream patche to the vendored libxml2 to address:
3
+ Note that rc1 was not released.
4
4
 
5
- * unclosed comment uninitialized access issue (#1376)
6
-
7
- This issue does not have a CVE assigned to it as this time.
8
5
 
6
+ ==== 機能
9
7
 
10
- === 1.6.6.3 / 2015-11-16
8
+ * Cross-built gems now have a proper ruby version requirement. (#1266)
9
+ * Ruby 2.2.x is supported on Windows.
10
+ * Native build is supported on Windows.
11
11
 
12
- This version pulls in several upstream patches to the vendored libxml2 and libxslt to address:
13
12
 
14
- * CVE-2015-1819
15
- * CVE-2015-7941_1
16
- * CVE-2015-7941_2
17
- * CVE-2015-7942
18
- * CVE-2015-7942-2
19
- * CVE-2015-8035
20
- * CVE-2015-7995
13
+ ==== バグ修正
21
14
 
22
- See #1374 for details.
15
+ * [JRuby] Document#parse should support IO objects that respond to #read. (#1124) (Thanks, Jake Byman!)
16
+ * [MRI] Duplicate-id errors when setting the `id` attribute on HTML documents are now silenced. (#1262)
17
+ * [JRuby] 角括弧([, ])がテキスト内に存在すると、SAXパーザがテキストを分割してしまう。(#1261)
18
+ * [JRuby] ネームスペース付きのアトリビュートがremove_attributeで削除されない。 (#1299)
23
19
 
24
20
 
25
21
  === 1.6.6.2 / 2015年01月23日
26
22
 
27
- ==== Bug fixes
23
+ ==== バグ修正
28
24
 
29
25
  * Fixed installation issue affecting compiler arguments. (#1230)
30
26
 
@@ -33,6 +29,7 @@ See #1374 for details.
33
29
 
34
30
  Note that 1.6.6.0 was not released.
35
31
 
32
+
36
33
  ==== 機能
37
34
 
38
35
  * Unified Node and NodeSet implementations of #search, #xpath and #css.
@@ -183,7 +180,7 @@ libxml2 2.6.21 以上が必要に. (従前は 2.6.17 以上)
183
180
 
184
181
  === 1.6.1 / 2013年12月14日
185
182
 
186
- * Bugfixes
183
+ * バグ修正
187
184
 
188
185
  * (JRuby) 不正なドキュメントをパースするときにメモリ不足に陥るバグを修正
189
186
  * (JRuby) Billion-laughs攻撃対策のリグレッションを修正 #586
@@ -223,7 +220,7 @@ libxml2 2.6.21 以上が必要に. (従前は 2.6.17 以上)
223
220
 
224
221
  === 1.5.11 / 2013年12月14日
225
222
 
226
- * Bugfixes
223
+ * バグ修正
227
224
 
228
225
  * (JRuby) 不正なドキュメントをパースするときにメモリ不足に陥るバグを修正
229
226
  * (JRuby) Billion-laughs攻撃対策のリグレッションを修正 #586
@@ -1,25 +1,21 @@
1
- === 1.6.6.4 / 2015-11-19
1
+ === 1.6.7.rc2 / 2015-08-31
2
2
 
3
- This version pulls in an upstream patche to the vendored libxml2 to address:
3
+ Note that rc1 was not released.
4
4
 
5
- * unclosed comment uninitialized access issue (#1376)
6
-
7
- This issue does not have a CVE assigned to it as this time.
8
5
 
6
+ ==== Features
9
7
 
10
- === 1.6.6.3 / 2015-11-16
8
+ * Cross-built gems now have a proper ruby version requirement. (#1266)
9
+ * Ruby 2.2.x is supported on Windows.
10
+ * Native build is supported on Windows.
11
11
 
12
- This version pulls in several upstream patches to the vendored libxml2 and libxslt to address:
13
12
 
14
- * CVE-2015-1819
15
- * CVE-2015-7941_1
16
- * CVE-2015-7941_2
17
- * CVE-2015-7942
18
- * CVE-2015-7942-2
19
- * CVE-2015-8035
20
- * CVE-2015-7995
13
+ ==== Bug fixes
21
14
 
22
- See #1374 for details.
15
+ * [JRuby] Document#parse should support IO objects that respond to #read. (#1124) (Thanks, Jake Byman!)
16
+ * [MRI] Duplicate-id errors when setting the `id` attribute on HTML documents are now silenced. (#1262)
17
+ * [JRuby] SAX parser cuts texts in peices when quare brackets exist. (#1261)
18
+ * [JRuby] Namespaced attributes aren't removed by remove_attribute. (#1299)
23
19
 
24
20
 
25
21
  === 1.6.6.2 / 2015-01-23
@@ -33,6 +29,7 @@ See #1374 for details.
33
29
 
34
30
  Note that 1.6.6.0 was not released.
35
31
 
32
+
36
33
  ==== Features
37
34
 
38
35
  * Unified Node and NodeSet implementations of #search, #xpath and #css.
data/Gemfile CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  source "https://rubygems.org/"
6
6
 
7
- gem "mini_portile", "~>0.6.0"
7
+ gem "mini_portile", "~>0.7.0.rc2"
8
8
 
9
9
  gem "rdoc", "~>4.0", :group => [:development, :test]
10
10
  gem "hoe-bundler", ">=1.1", :group => [:development, :test]
@@ -14,6 +14,7 @@ gem "hoe-git", ">=1.4", :group => [:development, :test]
14
14
  gem "minitest", "~>2.2.2", :group => [:development, :test]
15
15
  gem "rake", ">=0.9", :group => [:development, :test]
16
16
  gem "rake-compiler", "~>0.9.2", :group => [:development, :test]
17
+ gem "rake-compiler-dock", "~>0.4.2", :group => [:development, :test]
17
18
  gem "racc", ">=1.4.6", :group => [:development, :test], :platform => :ruby
18
19
  gem "rexical", ">=1.0.5", :group => [:development, :test], :platform => :ruby
19
20
  gem "hoe", "~>3.13", :group => [:development, :test]
@@ -0,0 +1,31 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2008 - 2015:
4
+
5
+ * [Aaron Patterson](http://tenderlovemaking.com)
6
+ * [Mike Dalessio](http://mike.daless.io)
7
+ * [Charles Nutter](http://blog.headius.com)
8
+ * [Sergio Arbeo](http://www.serabe.com)
9
+ * [Patrick Mahoney](http://polycrystal.org)
10
+ * [Yoko Harada](http://yokolet.blogspot.com)
11
+ * [Akinori MUSHA](https://akinori.org)
12
+ * [John Shahid](https://github.com/jvshahid)
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining
15
+ a copy of this software and associated documentation files (the
16
+ 'Software'), to deal in the Software without restriction, including
17
+ without limitation the rights to use, copy, modify, merge, publish,
18
+ distribute, sublicense, and/or sell copies of the Software, and to
19
+ permit persons to whom the Software is furnished to do so, subject to
20
+ the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be
23
+ included in all copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
26
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -7,13 +7,14 @@ CHANGELOG.ja.rdoc
7
7
  CHANGELOG.rdoc
8
8
  C_CODING_STYLE.rdoc
9
9
  Gemfile
10
+ LICENSE.txt
10
11
  Manifest.txt
11
- README.ja.rdoc
12
- README.rdoc
12
+ README.md
13
13
  ROADMAP.md
14
14
  Rakefile
15
15
  STANDARD_RESPONSES.md
16
16
  Y_U_NO_GEMSPEC.md
17
+ appveyor.yml
17
18
  bin/nokogiri
18
19
  build_all
19
20
  dependencies.yml
@@ -242,28 +243,7 @@ lib/nokogiri/xslt.rb
242
243
  lib/nokogiri/xslt/stylesheet.rb
243
244
  lib/xercesImpl.jar
244
245
  lib/xsd/xmlparser/nokogiri.rb
245
- ports/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch
246
- ports/patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
247
- ports/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch
248
- ports/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch
249
- ports/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
250
- ports/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch
251
- ports/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch
252
- ports/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
253
- ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch
254
- ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
255
- ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch
256
- ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch
257
- ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
258
- ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch
259
- ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch
260
- ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch
261
- ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
262
- ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
263
- ports/patches/libxslt/0014-Fix-for-bug-436589.patch
264
- ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch
265
- ports/patches/libxslt/0016-Fix-for-type-confusion-in-preprocessing-attributes.patch
266
- ports/patches/sort-patches-by-date
246
+ patches/sort-patches-by-date
267
247
  suppressions/README.txt
268
248
  suppressions/nokogiri_ree-1.8.7.358.supp
269
249
  suppressions/nokogiri_ruby-1.8.7.370.supp
@@ -0,0 +1,170 @@
1
+ # Nokogiri
2
+
3
+ * http://nokogiri.org
4
+ * Installation: http://nokogiri.org/tutorials/installing_nokogiri.html
5
+ * Tutorials: http://nokogiri.org
6
+ * README: https://github.com/sparklemotion/nokogiri
7
+ * Mailing List: https://groups.google.com/group/nokogiri-talk
8
+ * Bug Reports: https://github.com/sparklemotion/nokogiri/issues
9
+
10
+
11
+ ## Status
12
+
13
+ [![Travis Build Status](https://travis-ci.org/sparklemotion/nokogiri.svg?branch=master)](https://travis-ci.org/sparklemotion/nokogiri)
14
+ [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/sparklemotion/nokogiri?branch=master&svg=true)](https://ci.appveyor.com/project/flavorjones/nokogiri?branch=master)
15
+ [![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.png)](https://codeclimate.com/github/sparklemotion/nokogiri)
16
+ [![Version Eye](https://www.versioneye.com/ruby/nokogiri/badge.png)](https://www.versioneye.com/ruby/nokogiri)
17
+
18
+
19
+ ## Description
20
+
21
+ Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
22
+ Nokogiri's many features is the ability to search documents via XPath
23
+ or CSS3 selectors.
24
+
25
+ XML is like violence - if it doesn’t solve your problems, you are not
26
+ using enough of it.
27
+
28
+
29
+ ## Features
30
+
31
+ * XML/HTML DOM parser which handles broken HTML
32
+ * XML/HTML SAX parser
33
+ * XML/HTML Push parser
34
+ * XPath 1.0 support for document searching
35
+ * CSS3 selector support for document searching
36
+ * XML/HTML builder
37
+ * XSLT transformer
38
+
39
+ Nokogiri parses and searches XML/HTML using native libraries (either C
40
+ or Java, depending on your Ruby), which means it's fast and
41
+ standards-compliant.
42
+
43
+
44
+ ## Installation
45
+
46
+ If this doesn't work:
47
+
48
+ ```
49
+ gem install nokogiri
50
+ ```
51
+
52
+ then please start troubleshooting here:
53
+
54
+ > http://www.nokogiri.org/tutorials/installing_nokogiri.html
55
+
56
+ There are currently 1,237 Stack Overflow questions about Nokogiri
57
+ installation. The vast majority of them are out of date and therefore
58
+ incorrect. __Please do not use Stack Overflow.__
59
+
60
+ Instead, [tell us](http://nokogiri.org/tutorials/getting_help.html)
61
+ when the above instructions don't work for you. This allows us to both
62
+ help you directly and improve the documentation.
63
+
64
+
65
+ ### Binary packages
66
+
67
+ Binary packages are available for some distributions.
68
+
69
+ * Debian: https://packages.debian.org/sid/ruby-nokogiri
70
+ * SuSE: https://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/
71
+ * Fedora: http://s390.koji.fedoraproject.org/koji/packageinfo?packageID=6756
72
+
73
+
74
+ ## Support
75
+
76
+ There are open-source tutorials (to which we invite contributions!) here: http://nokogiri.org/tutorials
77
+
78
+ * The Nokogiri mailing list is active: https://groups.google.com/group/nokogiri-talk
79
+ * The Nokogiri bug tracker is here: https://github.com/sparklemotion/nokogiri/issues
80
+ * Before filing a bug report, please read our submission guidelines: http://nokogiri.org/tutorials/getting_help.html
81
+ * The IRC channel is #nokogiri on freenode.
82
+
83
+
84
+ ## Synopsis
85
+
86
+ Nokogiri is a large library, but here is example usage for parsing and examining a document:
87
+
88
+ ```ruby
89
+ require 'nokogiri'
90
+ require 'open-uri'
91
+
92
+ # Fetch and parse HTML document
93
+ doc = Nokogiri::HTML(open('http://www.nokogiri.org/tutorials/installing_nokogiri.html'))
94
+
95
+ ####
96
+ # Search for nodes by css
97
+ doc.css('nav ul.menu li a').each do |link|
98
+ puts link.content
99
+ end
100
+
101
+ ####
102
+ # Search for nodes by xpath
103
+ doc.xpath('//h2 | //h3').each do |link|
104
+ puts link.content
105
+ end
106
+
107
+ ####
108
+ # Or mix and match.
109
+ doc.search('code.sh', '//h2').each do |link|
110
+ puts link.content
111
+ end
112
+ ```
113
+
114
+
115
+ ## Requirements
116
+
117
+ * Ruby 1.9.3 or higher, including any development packages necessary
118
+ to compile native extensions.
119
+
120
+ * In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the
121
+ gem, but if you want to use the system versions:
122
+
123
+ * at install time, set the environment variable
124
+ `USING_SYSTEM_ALLOCATOR_LIBRARY` or else use the
125
+ `--use-system-libraries` argument. (See
126
+ http://nokogiri.org/tutorials/installing_nokogiri.html#using_your_system_libraries
127
+ for specifics.)
128
+
129
+ * libxml2 >=2.6.21 with iconv support
130
+ (libxml2-dev/-devel is also required)
131
+
132
+ * libxslt, built with and supported by the given libxml2
133
+ (libxslt-dev/-devel is also required)
134
+
135
+
136
+ ## Encoding
137
+
138
+ Strings are always stored as UTF-8 internally. Methods that return
139
+ text values will always return UTF-8 encoded strings. Methods that
140
+ return a string containing markup (like `to_xml`, `to_html` and
141
+ `inner_html`) will return a string encoded like the source document.
142
+
143
+ __WARNING__
144
+
145
+ Some documents declare one encoding, but actually use a different
146
+ one. In these cases, which encoding should the parser choose?
147
+
148
+ Data is just a stream of bytes. Humans add meaning to that stream. Any
149
+ particular set of bytes could be valid characters in multiple
150
+ encodings, so detecting encoding with 100% accuracy is not
151
+ possible. `libxml2` does its best, but it can't be right all the time.
152
+
153
+ If you want Nokogiri to handle the document encoding properly, your
154
+ best bet is to explicitly set the encoding. Here is an example of
155
+ explicitly setting the encoding to EUC-JP on the parser:
156
+
157
+ ```ruby
158
+ doc = Nokogiri.XML('<foo><bar /><foo>', nil, 'EUC-JP')
159
+ ```
160
+
161
+ ## Development
162
+
163
+ ```bash
164
+ bundle install
165
+ bundle exec rake
166
+ ```
167
+
168
+ ## License
169
+
170
+ MIT. See the `LICENSE.txt` file.