Ryan Smith wrote: > one chinese character show different code in two different machine. > > machine A: \243\244 > machine B: \302\245 > > so I have to using different pattern for two machines, like this: > machine A: text.split("\243\244") > machine B: text.split("\302\245") > > I know this is not the proper way, but could some one tell me: > what is the root course? > What different between machine A and B? > what is the proper way to handle this ? > > thanks very much! > > -ryan Are the two machines getting the text from the same source? What is the source? What is the encoding of the source? What locale is Ruby running under? What version of Ruby are you running? What encoding is the relevant Ruby source file set to? How are you retrieving the text from the source? What encoding is the string once its finally retrieved? -- Posted via http://www.ruby-forum.com/.