On Tue, Jan 28, 2014 at 12:41:05PM +0800, demerphq wrote: > [Retitled this to start a new thread.] [Not read previous thread yet. Life excessively busy. Working to fix that.] > My current thoughts are that this can be facilitated by attaching > magic to the scalar and some minor patches to the appropriate parts of > the internals. Your suggestion makes me think that it might be doable purely in XS, and possibly back to 5.8.0 As you suggest, attach magic to flag a scalar as "don't ever 'upgrade'". Take advantage of PL_encoding. Set it to an object that has a "decode" method that checks for this magic, and croaks if it finds it. That *might* be enough. (Patch any locations that don't currently check PL_encoding before calling sv_recode_to_utf8(), or do the 'upgrade' some other way) Nicholas ClarkThread Previous | Thread Next