Description: Switch unaccent implementation
 This reverts the PR mentioned below, as unaccent is not available.
Author: Simon Quigley <tsimonq2@debian.org>
Origin: https://github.com/countries/countries/pull/767
Last-Update: 2026-02-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/countries.gemspec
+++ b/countries.gemspec
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
 
   gem.required_ruby_version = '>= 3.2'
 
-  gem.add_dependency('unaccent', '~> 0.3')
+  gem.add_dependency('sixarm_ruby_unaccent')
   gem.add_development_dependency('activesupport', '>= 3', '< 8')
   gem.add_development_dependency('nokogiri', '>= 1.8')
   gem.add_development_dependency('rspec', '>= 3')
--- a/lib/countries/country/class_methods.rb
+++ b/lib/countries/country/class_methods.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-require 'unaccent'
+require 'sixarm_ruby_unaccent'
 
 module ISO3166
   UNSEARCHABLE_METHODS = [:translations].freeze
@@ -93,9 +93,9 @@ module ISO3166
     # :reek:UtilityFunction
     def strip_accents(string)
       if string.is_a?(Regexp)
-        Regexp.new(Unaccent.unaccent(string.source), 'i')
+        Regexp.new(string.source.unaccent, 'i')
       else
-        Unaccent.unaccent(string.to_s).downcase
+        string.to_s.unaccent.downcase
       end
     end
 
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,7 +2,6 @@ PATH
   remote: .
   specs:
     countries (8.1.0)
-      unaccent (~> 0.3)
 
 GEM
   remote: https://rubygems.org/
@@ -105,7 +104,6 @@ GEM
     tsort (0.2.0)
     tzinfo (2.0.6)
       concurrent-ruby (~> 1.0)
-    unaccent (0.4.0)
     yaml (0.4.0)
 
 PLATFORMS
