Re: unicode data in ascii template

Bill Moseley <[email protected]> Fri, 10 Jan 2014 07:28:30 -0800
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <CAKhN_m4A8H-nDa2+gMFkJFckWgzv9Xd3x3uosm9XE4hpcBySbg@mail.gmail.com>
On Fri, Jan 10, 2014 at 6:51 AM, Dave Howorth <dhoworth-fDajt2Yx3S8pY9vWkoisglpr/1R2p/[email protected]>wrote:

> Solved it ...
>

Cool.

>
> - one module used by my main program was making its own connection to
> the database (for historical reasons). Apparently that changes the
> mysql_enable_utf8 setting on my main connection. I'm sure DBIC has a
> good reason for that which I ought to know, but it sure wasn't something
> I was expecting. Praise be to the debugger for finding that.
>

It would not be DBIC, but DBD::mysql.  I'd be surprised if that wasn't a
per-connection setting.



>
> - and of course changing encoding options for templates doesn't actually
> have any effect unless you actually subsequently edit the template,
> thanks to the wonders of TT's compilation cache. It was only because I
> updated the copyright message from 2013 to 2014 that I happened to fix
> that problem; just lucky it happened at this time of year, I guess.
>

Good catch.   In my dev config I have this:


# When debugging
View::TT:
    # Disable caching during development
    STAT_TTL: 0
    COMPILE_DIR:


and I used to purge the existing cache at production push.   That would be
worth looking into more.

-- 
Bill Moseley
[email protected]

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates