Re: UTF8 flag missing on stringified references On Wed, Oct 17, 2007 at 10:19:19PM +0200, Juerd Waalboer wrote:
} josh skribis 2007-10-17 13:12 (-0700):
} > Aren't package names just C-strings? They aren't SVs and can't get
} > marked with an encoding. Your ae character isn't valid where you used it.
} 
} Identifiers are either ASCII or UTF-8, so the difference can be detected
} rather easily. In fact, marking them all with SvUTF8 would only hurt at
} a distance: upgrades that some legacy code can very probably not handle.

Ok, where I remember this is from hv.h where stash names are stored in
a character array. What I didn't know was that even though it is
stored as a byte sequence, the very last byte has some flags which
also tell whether the byte sequence is utf8 encoded or not. Oops.

HEK_UTF8( HvNAME_HEK( hv ) ) ;; is utf8?
HEK_LEN( HvNAME_hek( hv ) ) ;; how many bytes long?
HvNAME( hv ) ;; the name

} It's not invalid, "use utf8" enables exactly this.

Yep, you're right. I goofed.

-- 
Josh
