![]() |
perl-unicode
|
Re: Weird interaction of ord, split, and substr with UTF-8?2000-11-01 09:21:51At 8:01 AM +0100 11/1/00, Andreas J. Koenig wrote: >>>>> On Tue, 31 Oct 2000 16:03:24 -0800, Paul Hoffman <phoffman(_at_)proper(_dot_)com> said:> $ThisOrd = utf8($ThisChar)->ord; Replace that by $ThisOrd = $ThisChar->ord; substr already returns objects, now when you call a function on it, it will be interpreted as a method and convert the object back to a UTF-8 encoded string. Thanks! This helped me find another similar error in my program. It is tempting to treat the $us's as regular strings.
|
|