diff --git a/lib/rex/text/table.rb b/lib/rex/text/table.rb index db11fe7..0982438 100644 --- a/lib/rex/text/table.rb +++ b/lib/rex/text/table.rb @@ -423,7 +423,7 @@ protected __method__.to_s << ': String with unsupported encoding caught!' end utf8_buf = buf.dup.force_encoding("UTF-8") - hans_size = utf8_buf.size - utf8_buf.gsub(/[\u4e00-\u9fa5]/, '').size + hans_size = utf8_buf.size - utf8_buf.gsub(/\p{Han}+/u, '').size remainder = max - utf8_buf.length - hans_size remainder = 0 if remainder < 0 val = chr * remainder