]> git.openstreetmap.org Git - rails.git/blobdiff - lib/utf8.rb
Set the locale for issue and report views
[rails.git] / lib / utf8.rb
index 5f0d219baa10293e104fb7decfa916ac0ea79100..7865d62039566855efc105f54b7682d18974cd46 100644 (file)
@@ -4,11 +4,6 @@ module UTF8
   # using the iconv library, which is in the standard library.
   def self.valid?(str)
     return true if str.nil?
-    Iconv.conv("UTF-8", "UTF-8", str)
-    return true
-    
-  rescue
-    return false
-  end  
+    str.valid_encoding?
+  end
 end
-