Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-08 Thread Daniel McBrearty
i don't know if this helps ... i had to dig around my code to find it, but I have this at the top of every template (actually at the top on an included template that they all use ... [% USE encoding 'utf-8' %] IIRC this ensures that the correct headers are sent out before the html. you can check

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Stefan Kühn
Thanks to all of you for Your postings. I have continued to investigate. I found, that TT is not the reason. I can reproduce the problem in 4 simple steps just by using Catalyst. 1. Create a Catalyst application catalyst.pl CatSimple 2. cd CatSimple 3. Create a Controller

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Daniel McBrearty
what does the browser tell you is the encoding of the page it is getting? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Matt Lawrence
Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string,

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Stefan Kühn
On 9/7/07, Matt Lawrence [EMAIL PROTECTED] wrote: AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string, explicitly

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Matt Lawrence
Matt Lawrence wrote: Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real

RE: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-06 Thread Hartmaier Alexander
I couldn't find it yesterday when I did a quick search for it. Maybe you should mail Juerd. -Alex -Original Message- From: Daniel McBrearty [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 05, 2007 10:40 PM To: The elegant MVC web framework Subject: Re: [Catalyst] TT and UNICODE

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-06 Thread Stefan Kühn
I guess, you have to be a participant of the conference to access the presentations. It has been similar with the german Perl Workshop. On 9/6/07, Hartmaier Alexander [EMAIL PROTECTED] wrote: I couldn't find it yesterday when I did a quick search for it. Maybe you should mail Juerd. --

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-06 Thread Jonathan Rockway
Daniel McBrearty wrote: It seems to me that Template-Toolkit does no UTF-8-encoding of the outputted variables. well, it shouldn't. In perl, strings are already utf8, internally. If TT was to do encoding, they would be double-encoded. The internal encoding that perl uses is none

[Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Stefan Kühn
I have a problem when outputting special characters with Template-Toolkit and C::P::Unicode. I passed a simple template parameter from the controller to the view. The parameter contains a special character and is being garbled in the output. I studied the mailing list the whole afternoon, but

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Tobias Kremer
Quoting Stefan Kühn [EMAIL PROTECTED]: I have a problem when outputting special characters with Template-Toolkit and C::P::Unicode. I passed a simple template parameter from the controller to the view. The parameter contains a special character and is being garbled in the output. * In

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Stefan Kühn
Hi Tobias i tried both of it, but still got the same result. NEXT TRY: * i saved the controller test.pm in UTF-8 encoding, * adapted the broken character ... * called the url * and it worked! QUESTION: Catalyst generates Perl files in the computer's standard encoding (which is cp1252). For

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Daniel McBrearty
if you are going to write unicode characters in your source code, don't you need to say use utf8; or something? http://search.cpan.org/~nwclark/perl-5.8.8/lib/utf8.pm I'm not sure what the default is.Source code is ascii by default , AFAIK - if you are going to use something which is in the

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Stefan Kühn
On 9/5/07, Tobias Kremer [EMAIL PROTECTED] wrote: QUESTION: Catalyst generates Perl files in the computer's standard encoding (which is cp1252). For *unicode best practice* it should be in UTF-8 encoded. Do you agree? AFAIK Catalyst itself doesn't generate any Perl files at all. But maybe

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Stefan Kühn
On 9/5/07, Daniel McBrearty [EMAIL PROTECTED] wrote: how your editor is actually writing that u-with-umlaut into the text file will also be a fatcor (it might be entering ISO-8859-1 or UTF8). try using the appropriate \x{ ... } way of writing the char to see if this is your problem. NOW i am

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Daniel McBrearty
It seems to me that Template-Toolkit does no UTF-8-encoding of the outputted variables. well, it shouldn't. In perl, strings are already utf8, internally. If TT was to do encoding, they would be double-encoded. so what you have to do is get that u-with-umlaut *into* perl as a utf8 encoded

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Stefan Kühn
On 9/5/07, Daniel McBrearty [EMAIL PROTECTED] wrote: It seems to me that Template-Toolkit does no UTF-8-encoding of the outputted variables. well, it shouldn't. Maybe i should adjust my statement: __it looks like TT uses the wrong Encoding for the output of vars.__ Obviously, the string

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Daniel McBrearty
Obviously, the string variable reaches the stash correctly. I wrote it's content to a UTF-8 file and i found the result correctly. then I don't know. you could try updating the libs, but I can tell you that I've been using TT since mid last year, and had no problems - i have heaps of utf8

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Matt Rosin
Have you tried setting shell locale to utf8? A long time ago there were utf8 in tt threads but I haven't had trouble myself. However I have indeed had massive trouble trying to get a simple question mark (a GET url) to print that I put in the stash, like you are doing now, because tt would

RE: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Hartmaier Alexander
and UNICODE: Garbled special characters Have you tried setting shell locale to utf8? A long time ago there were utf8 in tt threads but I haven't had trouble myself. However I have indeed had massive trouble trying to get a simple question mark (a GET url) to print that I put in the stash, like you

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Bill Moseley
On Wed, Sep 05, 2007 at 01:14:54PM +0200, Stefan Kühn wrote: On 9/5/07, Tobias Kremer [EMAIL PROTECTED] wrote: QUESTION: Catalyst generates Perl files in the computer's standard encoding (which is cp1252). For *unicode best practice* it should be in UTF-8 encoded. Do you agree? AFAIK

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-05 Thread Daniel McBrearty
This talk was great: http://vienna.yapceurope.org/ye2007/talk/552 Check out the slides of his talk. looks interesting - where *are* the slides? no link from the page :-) thanks! ___ List: Catalyst@lists.rawmode.org Listinfo: