Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

prepending r to appropriate files

  • Loading branch information...
commit 2f2d4a3d22f00957724c348a2fe5c551cda4aa3d 1 parent dbfe883
Jeff Hodges authored
Showing with 63 additions and 64 deletions.
  1. +2 −3 README
  2. +0 −61 lib/chardet.rb
  3. +61 −0 lib/rchardet.rb
  4. 0  lib/{chardet → rchardet}/big5freq.rb
  5. 0  lib/{chardet → rchardet}/big5prober.rb
  6. 0  lib/{chardet → rchardet}/chardistribution.rb
  7. 0  lib/{chardet → rchardet}/charsetgroupprober.rb
  8. 0  lib/{chardet → rchardet}/charsetprober.rb
  9. 0  lib/{chardet → rchardet}/codingstatemachine.rb
  10. 0  lib/{chardet → rchardet}/constants.rb
  11. 0  lib/{chardet → rchardet}/escprober.rb
  12. 0  lib/{chardet → rchardet}/escsm.rb
  13. 0  lib/{chardet → rchardet}/eucjpprober.rb
  14. 0  lib/{chardet → rchardet}/euckrfreq.rb
  15. 0  lib/{chardet → rchardet}/euckrprober.rb
  16. 0  lib/{chardet → rchardet}/euctwfreq.rb
  17. 0  lib/{chardet → rchardet}/euctwprober.rb
  18. 0  lib/{chardet → rchardet}/gb2312freq.rb
  19. 0  lib/{chardet → rchardet}/gb2312prober.rb
  20. 0  lib/{chardet → rchardet}/hebrewprober.rb
  21. 0  lib/{chardet → rchardet}/jisfreq.rb
  22. 0  lib/{chardet → rchardet}/jpcntx.rb
  23. 0  lib/{chardet → rchardet}/langbulgarianmodel.rb
  24. 0  lib/{chardet → rchardet}/langcyrillicmodel.rb
  25. 0  lib/{chardet → rchardet}/langgreekmodel.rb
  26. 0  lib/{chardet → rchardet}/langhebrewmodel.rb
  27. 0  lib/{chardet → rchardet}/langhungarianmodel.rb
  28. 0  lib/{chardet → rchardet}/langthaimodel.rb
  29. 0  lib/{chardet → rchardet}/latin1prober.rb
  30. 0  lib/{chardet → rchardet}/mbcharsetprober.rb
  31. 0  lib/{chardet → rchardet}/mbcsgroupprober.rb
  32. 0  lib/{chardet → rchardet}/mbcssm.rb
  33. 0  lib/{chardet → rchardet}/sbcharsetprober.rb
  34. 0  lib/{chardet → rchardet}/sbcsgroupprober.rb
  35. 0  lib/{chardet → rchardet}/sjisprober.rb
  36. 0  lib/{chardet → rchardet}/universaldetector.rb
  37. 0  lib/{chardet → rchardet}/utf8prober.rb
View
5 README
@@ -1,7 +1,6 @@
Usage:
require 'rubygems'
- gem 'rchardet'
- require 'chardet' # Note the difference in the names
+ require 'rchardet'
cd = CharDet.detect(some_data)
encoding = cd['encoding']
@@ -10,4 +9,4 @@ Usage:
Project page:
http://rubyforge.org/projects/rchardet
- Used heavily in rFeedParser <http://rfeedparser.rubyforge.org>.
+ Made for rFeedParser <http://rfeedparser.rubyforge.org>.
View
61 lib/chardet.rb
@@ -1,61 +0,0 @@
-######################## BEGIN LICENSE BLOCK ########################
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA
-######################### END LICENSE BLOCK #########################
-require 'chardet/charsetprober'
-require 'chardet/mbcharsetprober'
-
-require 'chardet/big5freq'
-require 'chardet/big5prober'
-require 'chardet/chardistribution'
-require 'chardet/charsetgroupprober'
-
-require 'chardet/codingstatemachine'
-require 'chardet/constants'
-require 'chardet/escprober'
-require 'chardet/escsm'
-require 'chardet/eucjpprober'
-require 'chardet/euckrfreq'
-require 'chardet/euckrprober'
-require 'chardet/euctwfreq'
-require 'chardet/euctwprober'
-require 'chardet/gb2312freq'
-require 'chardet/gb2312prober'
-require 'chardet/hebrewprober'
-require 'chardet/jisfreq'
-require 'chardet/jpcntx'
-require 'chardet/langbulgarianmodel'
-require 'chardet/langcyrillicmodel'
-require 'chardet/langgreekmodel'
-require 'chardet/langhebrewmodel'
-require 'chardet/langhungarianmodel'
-require 'chardet/langthaimodel'
-require 'chardet/latin1prober'
-
-require 'chardet/mbcsgroupprober'
-require 'chardet/mbcssm'
-require 'chardet/sbcharsetprober'
-require 'chardet/sbcsgroupprober'
-require 'chardet/sjisprober'
-require 'chardet/universaldetector'
-require 'chardet/utf8prober'
-include CharDet
-def CharDet.detect(aBuf)
- u = UniversalDetector.new
- u.reset
- u.feed(aBuf)
- u.close
- return u.result
-end
View
61 lib/rchardet.rb
@@ -0,0 +1,61 @@
+######################## BEGIN LICENSE BLOCK ########################
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+######################### END LICENSE BLOCK #########################
+require 'rchardet/charsetprober'
+require 'rchardet/mbcharsetprober'
+
+require 'rchardet/big5freq'
+require 'rchardet/big5prober'
+require 'rchardet/chardistribution'
+require 'rchardet/charsetgroupprober'
+
+require 'rchardet/codingstatemachine'
+require 'rchardet/constants'
+require 'rchardet/escprober'
+require 'rchardet/escsm'
+require 'rchardet/eucjpprober'
+require 'rchardet/euckrfreq'
+require 'rchardet/euckrprober'
+require 'rchardet/euctwfreq'
+require 'rchardet/euctwprober'
+require 'rchardet/gb2312freq'
+require 'rchardet/gb2312prober'
+require 'rchardet/hebrewprober'
+require 'rchardet/jisfreq'
+require 'rchardet/jpcntx'
+require 'rchardet/langbulgarianmodel'
+require 'rchardet/langcyrillicmodel'
+require 'rchardet/langgreekmodel'
+require 'rchardet/langhebrewmodel'
+require 'rchardet/langhungarianmodel'
+require 'rchardet/langthaimodel'
+require 'rchardet/latin1prober'
+
+require 'rchardet/mbcsgroupprober'
+require 'rchardet/mbcssm'
+require 'rchardet/sbcharsetprober'
+require 'rchardet/sbcsgroupprober'
+require 'rchardet/sjisprober'
+require 'rchardet/universaldetector'
+require 'rchardet/utf8prober'
+include CharDet
+def CharDet.detect(aBuf)
+ u = UniversalDetector.new
+ u.reset
+ u.feed(aBuf)
+ u.close
+ return u.result
+end
View
0  lib/chardet/big5freq.rb → lib/rchardet/big5freq.rb
File renamed without changes
View
0  lib/chardet/big5prober.rb → lib/rchardet/big5prober.rb
File renamed without changes
View
0  lib/chardet/chardistribution.rb → lib/rchardet/chardistribution.rb
File renamed without changes
View
0  lib/chardet/charsetgroupprober.rb → lib/rchardet/charsetgroupprober.rb
File renamed without changes
View
0  lib/chardet/charsetprober.rb → lib/rchardet/charsetprober.rb
File renamed without changes
View
0  lib/chardet/codingstatemachine.rb → lib/rchardet/codingstatemachine.rb
File renamed without changes
View
0  lib/chardet/constants.rb → lib/rchardet/constants.rb
File renamed without changes
View
0  lib/chardet/escprober.rb → lib/rchardet/escprober.rb
File renamed without changes
View
0  lib/chardet/escsm.rb → lib/rchardet/escsm.rb
File renamed without changes
View
0  lib/chardet/eucjpprober.rb → lib/rchardet/eucjpprober.rb
File renamed without changes
View
0  lib/chardet/euckrfreq.rb → lib/rchardet/euckrfreq.rb
File renamed without changes
View
0  lib/chardet/euckrprober.rb → lib/rchardet/euckrprober.rb
File renamed without changes
View
0  lib/chardet/euctwfreq.rb → lib/rchardet/euctwfreq.rb
File renamed without changes
View
0  lib/chardet/euctwprober.rb → lib/rchardet/euctwprober.rb
File renamed without changes
View
0  lib/chardet/gb2312freq.rb → lib/rchardet/gb2312freq.rb
File renamed without changes
View
0  lib/chardet/gb2312prober.rb → lib/rchardet/gb2312prober.rb
File renamed without changes
View
0  lib/chardet/hebrewprober.rb → lib/rchardet/hebrewprober.rb
File renamed without changes
View
0  lib/chardet/jisfreq.rb → lib/rchardet/jisfreq.rb
File renamed without changes
View
0  lib/chardet/jpcntx.rb → lib/rchardet/jpcntx.rb
File renamed without changes
View
0  lib/chardet/langbulgarianmodel.rb → lib/rchardet/langbulgarianmodel.rb
File renamed without changes
View
0  lib/chardet/langcyrillicmodel.rb → lib/rchardet/langcyrillicmodel.rb
File renamed without changes
View
0  lib/chardet/langgreekmodel.rb → lib/rchardet/langgreekmodel.rb
File renamed without changes
View
0  lib/chardet/langhebrewmodel.rb → lib/rchardet/langhebrewmodel.rb
File renamed without changes
View
0  lib/chardet/langhungarianmodel.rb → lib/rchardet/langhungarianmodel.rb
File renamed without changes
View
0  lib/chardet/langthaimodel.rb → lib/rchardet/langthaimodel.rb
File renamed without changes
View
0  lib/chardet/latin1prober.rb → lib/rchardet/latin1prober.rb
File renamed without changes
View
0  lib/chardet/mbcharsetprober.rb → lib/rchardet/mbcharsetprober.rb
File renamed without changes
View
0  lib/chardet/mbcsgroupprober.rb → lib/rchardet/mbcsgroupprober.rb
File renamed without changes
View
0  lib/chardet/mbcssm.rb → lib/rchardet/mbcssm.rb
File renamed without changes
View
0  lib/chardet/sbcharsetprober.rb → lib/rchardet/sbcharsetprober.rb
File renamed without changes
View
0  lib/chardet/sbcsgroupprober.rb → lib/rchardet/sbcsgroupprober.rb
File renamed without changes
View
0  lib/chardet/sjisprober.rb → lib/rchardet/sjisprober.rb
File renamed without changes
View
0  lib/chardet/universaldetector.rb → lib/rchardet/universaldetector.rb
File renamed without changes
View
0  lib/chardet/utf8prober.rb → lib/rchardet/utf8prober.rb
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.