From: "Jon A. Lambert" Date: 2005-09-18T12:06:57+09:00 Subject: Re: StringScanner question Jon A. Lambert wrote: > Anyone know what the difference is, if any? Dear Jon, If you had bothered to read the source code you would have found a bunch of slick character encoding tables in regex.c and know that the lengths of characters in strings are dependent on the encoding options you be running on. As long as you be using usacii then you'll be alright, but if you start messing with kanji you'll be bitten on the ass as StringScanner will suddenly be popping and hopping through 1,2, or n bytes at a time with getch. So I'd recommend using getbyte. There are enough hints about such things dropped in the very first chapters of the "Coding Ruby: The Canonical Coder's Guide". Pay attention and do some research before wasting our time. -- J. Lambert