Ben Bullock wrote: > I have a web page which answers your question here: > > http://www.lemoda.net/perl/template-encoding/index.html
Yes, I found that page yesterday. It's a lot more helpful this morning with all the additional examples. Thanks, Ben! > I believe I got this answer from this mailing list a few years ago, > but don't have an exact recollection. I got various hits from a few years ago, but for questions like this I find I have to be very careful because the software may have been updated more recently (perl and/or TT) and made the answers different. Hence I wanted to throw my question out to the crowd .... Ben Bullock wrote offlist, which I guess was a mistake: > Sorry I wanted to point out one more thing: > >> * Actually, there is one sub-template that is PROCESSED that contains >> a Unicode copyright symbol and that is put in the output file >> unchanged. Just to confuse me further. > > The Unicode code point for the copyright symbol is A9 which is the > same as its Latin-1 code point. But when it's converted to UTF-8, by > coincidence it comes out as C2 A9. Then when the output is mishandled > as Latin-1 the second A9 byte of the copyright symbol as UTF-8 appears > on the screen as a copyright sign. It's a confusing coincidence. Yes, this is another aspect that confuses me. The copyright symbol in a sub-template passes all the way through the system to the output file with its correct utf-8 encoding. It doesn't get converted to windows-1252 like the quotes from the DBMS do. > Also I have updated the web page I mentioned earlier using an actual > example file and outputs, and hopefully it's clearer than it was: Yes, very helpful but also confusing, since my symptoms don't seem to match your examples. I haven't seen any wide character warnings at all and I don't get zì like corrupted characters (unless I tell Firefox to use the wrong encoding or use binmode with process). Instead, they're encoded in a different encoding. I still have the feeling that I don't understand the basics of what is happening in TT. Cheers, Dave _______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates