Bug fix - Using jRuby 1.7.16 in 1.9 mode causes Encoding::CompatibilityError - incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string). So force encoding for all regexp to use utf-8.