I'm seeing some very strange behavior when INCLUDEing or PROCESSing templates when data in the stash is not ASCII-encoded.
 
I have an object which has data members which are encoded in x-sjis-cp932 (ShiftJIS).  If I pass the object to an INCLUDEd or PROCESSed template, the data members are mangled.  Spefically, the character ƒ is inserted between each character in my string.  If I incorporate the sub-template directly in my higher-level template, the data is printed correctly.
 
Now, if that wasn't strange enough, I have other sub-templates which are not experiencing this behavior.  I've experimented with this for a day and the only work-around I have stumbled upon is the direct inclusion mentioned above.  Has anyone else experienced this problem, and if so, how did you fix it?  I originally suspected Stash->clone was the culprit, but since I get the same behavior w/ PROCESS, that must not be the problem.
 
I'm using Template-Toolkit 2.06, with XS stash (but I can reproduce the problem w/o XS stash).
 
Thanks for any help, I'll let you know if I figure out what I'm doing wrong :-).
 
++t

Reply via email to