diff --git a/debian/changelog b/debian/changelog
index 62b6735..08cfb8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-ruby-rchardet (1.6.1-2) UNRELEASED; urgency=medium
+ruby-rchardet (1.8.0-1) UNRELEASED; urgency=medium
 
+  [ Utkarsh Gupta ]
   * Add salsa-ci.yml
 
- -- Utkarsh Gupta <guptautkarsh2102@gmail.com>  Tue, 13 Aug 2019 07:04:26 +0530
+  [ Debian Janitor ]
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 20 Aug 2019 06:48:06 +0000
 
 ruby-rchardet (1.6.1-1) unstable; urgency=medium
 
diff --git a/lib/rchardet.rb b/lib/rchardet.rb
index 13012a9..3ed2a45 100644
--- a/lib/rchardet.rb
+++ b/lib/rchardet.rb
@@ -33,8 +33,8 @@ require 'rchardet/euckrfreq'
 require 'rchardet/euckrprober'
 require 'rchardet/euctwfreq'
 require 'rchardet/euctwprober'
-require 'rchardet/gb2312freq'
-require 'rchardet/gb2312prober'
+require 'rchardet/gb18030freq'
+require 'rchardet/gb18030prober'
 require 'rchardet/hebrewprober'
 require 'rchardet/jisfreq'
 require 'rchardet/jpcntx'
diff --git a/lib/rchardet/chardistribution.rb b/lib/rchardet/chardistribution.rb
index 61421f3..7239885 100644
--- a/lib/rchardet/chardistribution.rb
+++ b/lib/rchardet/chardistribution.rb
@@ -149,16 +149,16 @@ module CharDet
     end
   end
 
-  class GB2312DistributionAnalysis < CharDistributionAnalysis
+  class GB18030DistributionAnalysis < CharDistributionAnalysis
     def initialize
       super()
-      @charToFreqOrder = GB2312CharToFreqOrder
-      @tableSize = GB2312_TABLE_SIZE
-      @typicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO
+      @charToFreqOrder = GB18030CharToFreqOrder
+      @tableSize = GB18030_TABLE_SIZE
+      @typicalDistributionRatio = GB18030_TYPICAL_DISTRIBUTION_RATIO
     end
 
     def get_order(aStr)
-      # for GB2312 encoding, we are interested 
+      # for GB18030 encoding, we are interested 
       #  first  byte range: 0xb0 -- 0xfe
       #  second byte range: 0xa1 -- 0xfe
       # no validation needed here. State machine has done that
diff --git a/lib/rchardet/gb2312freq.rb b/lib/rchardet/gb18030freq.rb
similarity index 99%
rename from lib/rchardet/gb2312freq.rb
rename to lib/rchardet/gb18030freq.rb
index a2aaa48..9b8be06 100644
--- a/lib/rchardet/gb2312freq.rb
+++ b/lib/rchardet/gb18030freq.rb
@@ -26,7 +26,7 @@
 # 02110-1301  USA
 ######################### END LICENSE BLOCK #########################
 
-# GB2312 most frequently used character table
+# GB18030 most frequently used character table
 #
 # Char to FreqOrder table , from hz6763
 
@@ -41,11 +41,11 @@
 # Typical Distribution Ratio about 25% of Ideal one, still much higher that RDR
 
 module CharDet
-GB2312_TYPICAL_DISTRIBUTION_RATIO = 0.9
+GB18030_TYPICAL_DISTRIBUTION_RATIO = 0.9
 
-GB2312_TABLE_SIZE = 3760
+GB18030_TABLE_SIZE = 3760
 
-GB2312CharToFreqOrder = [
+GB18030CharToFreqOrder = [
 1671, 749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515, 572,3191,2205,
 2361, 224,2558, 479,1711, 963,3162, 440,4060,1905,2966,2947,3580,2647,3961,3842,
 2204, 869,4207, 970,2678,5626,2944,2956,1479,4048, 514,3595, 588,1346,2820,3409,
diff --git a/lib/rchardet/gb2312prober.rb b/lib/rchardet/gb18030prober.rb
similarity index 87%
rename from lib/rchardet/gb2312prober.rb
rename to lib/rchardet/gb18030prober.rb
index 4f0f2f0..897e939 100644
--- a/lib/rchardet/gb2312prober.rb
+++ b/lib/rchardet/gb18030prober.rb
@@ -27,16 +27,16 @@
 ######################### END LICENSE BLOCK #########################
 
 module CharDet
-  class GB2312Prober < MultiByteCharSetProber
+  class GB18030Prober < MultiByteCharSetProber
     def initialize
       super
-      @codingSM = CodingStateMachine.new(GB2312SMModel)
-      @distributionAnalyzer = GB2312DistributionAnalysis.new()
+      @codingSM = CodingStateMachine.new(GB18030SMModel)
+      @distributionAnalyzer = GB18030DistributionAnalysis.new()
       reset()
     end
 
     def get_charset_name
-      return "GB2312"
+      return "GB18030"
     end
   end
 end
diff --git a/lib/rchardet/mbcsgroupprober.rb b/lib/rchardet/mbcsgroupprober.rb
index eaee089..8346faa 100644
--- a/lib/rchardet/mbcsgroupprober.rb
+++ b/lib/rchardet/mbcsgroupprober.rb
@@ -36,7 +36,7 @@ module CharDet
                     UTF8Prober.new,
                     SJISProber.new,
                     EUCJPProber.new,
-                    GB2312Prober.new,
+                    GB18030Prober.new,
                     EUCKRProber.new,
                     Big5Prober.new,
                     EUCTWProber.new
diff --git a/lib/rchardet/mbcssm.rb b/lib/rchardet/mbcssm.rb
index a82040a..b9e8a92 100644
--- a/lib/rchardet/mbcssm.rb
+++ b/lib/rchardet/mbcssm.rb
@@ -239,9 +239,9 @@ module CharDet
     'name' =>  'x-euc-tw'
   }.freeze
 
-  # GB2312
+  # GB18030
 
-  GB2312_cls = [
+  GB18030_cls = [
     1,1,1,1,1,1,1,1,  # 00 - 07 
     1,1,1,1,1,1,0,0,  # 08 - 0f 
     1,1,1,1,1,1,1,1,  # 10 - 17 
@@ -276,7 +276,7 @@ module CharDet
     6,6,6,6,6,6,6,0  # f8 - ff 
   ].freeze
 
-  GB2312_st = [
+  GB18030_st = [
     EError,EStart,EStart,EStart,EStart,EStart,     3,EError,#00-07 
     EError,EError,EError,EError,EError,EError,EItsMe,EItsMe,#08-0f 
     EItsMe,EItsMe,EItsMe,EItsMe,EItsMe,EError,EError,EStart,#10-17 
@@ -290,13 +290,13 @@ module CharDet
   # it is used for frequency analysis only, and we are validing 
   # each code range there as well. So it is safe to set it to be 
   # 2 here. 
-  GB2312CharLenTable = [0, 1, 1, 1, 1, 1, 2].freeze
+  GB18030CharLenTable = [0, 1, 1, 1, 1, 1, 2].freeze
 
-  GB2312SMModel = {'classTable' =>  GB2312_cls,
+  GB18030SMModel = {'classTable' =>  GB18030_cls,
     'classFactor' =>  7,
-    'stateTable' =>  GB2312_st,
-    'charLenTable' =>  GB2312CharLenTable,
-    'name' =>  'GB2312'
+    'stateTable' =>  GB18030_st,
+    'charLenTable' =>  GB18030CharLenTable,
+    'name' =>  'GB18030'
   }.freeze
 
   # Shift_JIS
diff --git a/lib/rchardet/universaldetector.rb b/lib/rchardet/universaldetector.rb
index 97ec2d2..cb2a292 100644
--- a/lib/rchardet/universaldetector.rb
+++ b/lib/rchardet/universaldetector.rb
@@ -90,6 +90,16 @@ module CharDet
         elsif aBuf[0, 2] == "\xFE\xFF"
           # FE FF  UTF-16, big endian BOM
           @result = {'encoding' =>  "UTF-16BE", 'confidence' =>  1.0}
+        elsif aBuf[0, 3] == "\x2B\x2F\x76" && ["\x38", "\x39", "\x2B", "\x2F"].include?(aBuf[3, 1])
+          # NOTE: Ruby only includes "dummy" support for UTF-7.
+          # A Ruby UTF-7 string can't have methods called on it, nor can it be converted to anything else, but "BINARY"/"ASCII-8BIT".
+          # Still, this doesn't make detection useless, as UTF-7 encodings exist in the wild, and the scenario may need to be handled.
+          # 2B 2F 76 38  UTF-7
+          # 2B 2F 76 39  UTF-7
+          # 2B 2F 76 2B  UTF-7
+          # 2B 2F 76 2F  UTF-7
+          # 2B 2F 76 38 2D  UTF-7 with no following character (empty string)
+          @result = {'encoding' =>  "UTF-7", 'confidence' =>  0.99}
         end
       end
 
diff --git a/lib/rchardet/version.rb b/lib/rchardet/version.rb
index 39b71cc..f053eab 100644
--- a/lib/rchardet/version.rb
+++ b/lib/rchardet/version.rb
@@ -1,3 +1,3 @@
 module CharDet
-  VERSION = "1.6.1"
+  VERSION = "1.8.0"
 end
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index 4e84aec..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,83 +0,0 @@
---- !ruby/object:Gem::Specification
-name: rchardet
-version: !ruby/object:Gem::Version
-  version: 1.6.1
-platform: ruby
-authors:
-- Michael Grosser
-- Jeff Hodges
-autorequire: 
-bindir: bin
-cert_chain: []
-date: 2015-06-15 00:00:00.000000000 Z
-dependencies: []
-description: 
-email:
-- michael@grosser.it
-- jeff@somethingsimilar.com
-executables: []
-extensions: []
-extra_rdoc_files: []
-files:
-- lib/rchardet.rb
-- lib/rchardet/big5freq.rb
-- lib/rchardet/big5prober.rb
-- lib/rchardet/chardistribution.rb
-- lib/rchardet/charsetgroupprober.rb
-- lib/rchardet/charsetprober.rb
-- lib/rchardet/codingstatemachine.rb
-- lib/rchardet/constants.rb
-- lib/rchardet/escprober.rb
-- lib/rchardet/escsm.rb
-- lib/rchardet/eucjpprober.rb
-- lib/rchardet/euckrfreq.rb
-- lib/rchardet/euckrprober.rb
-- lib/rchardet/euctwfreq.rb
-- lib/rchardet/euctwprober.rb
-- lib/rchardet/gb2312freq.rb
-- lib/rchardet/gb2312prober.rb
-- lib/rchardet/hebrewprober.rb
-- lib/rchardet/jisfreq.rb
-- lib/rchardet/jpcntx.rb
-- lib/rchardet/langbulgarianmodel.rb
-- lib/rchardet/langcyrillicmodel.rb
-- lib/rchardet/langgreekmodel.rb
-- lib/rchardet/langhebrewmodel.rb
-- lib/rchardet/langhungarianmodel.rb
-- lib/rchardet/langthaimodel.rb
-- lib/rchardet/latin1prober.rb
-- lib/rchardet/mbcharsetprober.rb
-- lib/rchardet/mbcsgroupprober.rb
-- lib/rchardet/mbcssm.rb
-- lib/rchardet/sbcharsetprober.rb
-- lib/rchardet/sbcsgroupprober.rb
-- lib/rchardet/sjisprober.rb
-- lib/rchardet/universaldetector.rb
-- lib/rchardet/utf8prober.rb
-- lib/rchardet/version.rb
-homepage: https://github.com/jmhodges/rchardet
-licenses:
-- LGPL
-metadata: {}
-post_install_message: 
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: 1.9.3
-required_rubygems_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-requirements: []
-rubyforge_project: 
-rubygems_version: 2.2.2
-signing_key: 
-specification_version: 4
-summary: Character encoding auto-detection in Ruby. As smart as your browser. Open
-  source.
-test_files: []
diff --git a/rchardet.gemspec b/rchardet.gemspec
new file mode 100644
index 0000000..5800fcf
--- /dev/null
+++ b/rchardet.gemspec
@@ -0,0 +1,22 @@
+#########################################################
+# This file has been automatically generated by gem2tgz #
+#########################################################
+# -*- encoding: utf-8 -*-
+# stub: rchardet 1.8.0 ruby lib
+
+Gem::Specification.new do |s|
+  s.name = "rchardet".freeze
+  s.version = "1.8.0"
+
+  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
+  s.require_paths = ["lib".freeze]
+  s.authors = ["Michael Grosser".freeze, "Jeff Hodges".freeze]
+  s.date = "2018-06-01"
+  s.email = ["michael@grosser.it".freeze, "jeff@somethingsimilar.com".freeze]
+  s.files = ["lib/rchardet.rb".freeze, "lib/rchardet/big5freq.rb".freeze, "lib/rchardet/big5prober.rb".freeze, "lib/rchardet/chardistribution.rb".freeze, "lib/rchardet/charsetgroupprober.rb".freeze, "lib/rchardet/charsetprober.rb".freeze, "lib/rchardet/codingstatemachine.rb".freeze, "lib/rchardet/constants.rb".freeze, "lib/rchardet/escprober.rb".freeze, "lib/rchardet/escsm.rb".freeze, "lib/rchardet/eucjpprober.rb".freeze, "lib/rchardet/euckrfreq.rb".freeze, "lib/rchardet/euckrprober.rb".freeze, "lib/rchardet/euctwfreq.rb".freeze, "lib/rchardet/euctwprober.rb".freeze, "lib/rchardet/gb18030freq.rb".freeze, "lib/rchardet/gb18030prober.rb".freeze, "lib/rchardet/hebrewprober.rb".freeze, "lib/rchardet/jisfreq.rb".freeze, "lib/rchardet/jpcntx.rb".freeze, "lib/rchardet/langbulgarianmodel.rb".freeze, "lib/rchardet/langcyrillicmodel.rb".freeze, "lib/rchardet/langgreekmodel.rb".freeze, "lib/rchardet/langhebrewmodel.rb".freeze, "lib/rchardet/langhungarianmodel.rb".freeze, "lib/rchardet/langthaimodel.rb".freeze, "lib/rchardet/latin1prober.rb".freeze, "lib/rchardet/mbcharsetprober.rb".freeze, "lib/rchardet/mbcsgroupprober.rb".freeze, "lib/rchardet/mbcssm.rb".freeze, "lib/rchardet/sbcharsetprober.rb".freeze, "lib/rchardet/sbcsgroupprober.rb".freeze, "lib/rchardet/sjisprober.rb".freeze, "lib/rchardet/universaldetector.rb".freeze, "lib/rchardet/utf8prober.rb".freeze, "lib/rchardet/version.rb".freeze]
+  s.homepage = "https://github.com/jmhodges/rchardet".freeze
+  s.licenses = ["LGPL".freeze]
+  s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze)
+  s.rubygems_version = "2.5.2.1".freeze
+  s.summary = "Character encoding auto-detection in Ruby. As smart as your browser. Open source.".freeze
+end