]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/core/unicode.rb
utils: htmlinfo filtering doc cleanups
[user/henk/code/ruby/rbot.git] / lib / rbot / core / unicode.rb
index 92294bb3f541f5fb88a45761dc2c429f68e01c5d..9d42ec2422fe7e913596c4671f3c4b303dd9dd85 100644 (file)
@@ -21,6 +21,7 @@ class UnicodePlugin < CoreBotModule
     Config.register Config::ArrayValue.new(
     'encoding.charsets', :default => ['utf-8', 'cp1252', 'iso-8859-15'],
     :desc => "Ordered list of iconv(3) charsets the bot should try",
+    :validate_item => Proc.new { |x| !!(Iconv.new('utf-8', x) rescue nil) },
     :on_change => Proc.new { |bot, v| reconfigure_filter(bot) })
 
     class UnicodeFilter