On Tue, Feb 20, 2001 at 03:02:00AM +0000, Simon Cozens wrote: > > I'm saying you call an explicit function, eg to_utf8(), which gives > > you back a string such that if you say "substr $str, 0, 1", you get > > the first byte of the UTF-8 representation, and "length $str" is the > > length of the UTF-8 representation. Period. > > I wonder if this would work: > > sub to_utf8 { > use bytes; > return $_[0] > } Won't work quite like that, copying the $_[0] to the return stack copies everything including the UTF8-ness, use bytes does not play a role here. -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen