Corrected multibyte character encoding issue by explicitly setting the page encoding and updating /regexp/ with Regexp.new/escape etc.