seebs
5/10/2007 3:39:00 PM
In message <fa4a4c72b5e7e4697f09c19c8f2d5971@ruby-forum.com>, Todd Burch writes:
>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.
puts ">".tr('>a', 'bc') --> 'b'
So I don't think it's ALWAYS the case. What's the character before '>'
in your FROM_STRING?
-s