From: Benoit Daloze Date: 2010-01-29T03:05:40+09:00 Subject: Re: gsub not working to replace a 'Chinese' Charater. With ruby 1.9.2dev (2010-01-14 trunk 26319) [x86_64-darwin10.2.0] "strhanziend" It works fine. You need to set encoding with "# encoding: utf-8" at the top of the file. In fact, it will complain if not in 1.9.2 Ruby 1.8.6 is kind of outdated, but at least I think it works with "-Ku". 2010/1/28 Ryan Smith : > gsub not works for me when replace 'DBCS'(double byte character set) > character,  using last version ruby 1.8.6 > > when "strºº×Öend".gsub(/ºº×Ö/,"hanzi"), >   output still is: strºº×Öend , but not strhanziend which I want to > get. > > Searched web two whole night with no clue found. > > Anyone can help are much appreciated, need got it work very urgent. > thank you! > -- > Posted via http://www.ruby-forum.com/. > >