From: Rob Biedenharn Date: 2007-05-11T00:37:21+09:00 Subject: Re: Trouble using string.tr() On May 10, 2007, at 11:01 AM, Todd Burch wrote: > I've coded up EBCDIC to ASCII translate strings. Everything is > working > fine, except for the greater than symbol. (In EBCDIC, X'6E'). > > What is happening is that whenever a > is in the input string, it gets > translated with the character immediately following my '>' in the > TO_STRING. > > I've spent a lot of time making sure my characters in the FROM_STRING > and TO_STRING are in the proper order. > > I've tried escaping it to no avail. I looked in the doc index for > special notes about it, and did not see any. A Google search found > nothing either. > > Any ideas? I can provide the code if needed. > > Todd where does the code X'5C' appear? (that's a \ in ASCII) Even in single quotes, there are two special sequences: irb(main):001:0> a='\\' => "\\" irb(main):002:0> puts a \ => nil irb(main):003:0> b='\'' => "'" irb(main):004:0> puts b ' => nil (but please do show the code!) -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com