Re: mod_scgi on Apache2

Bo Yang <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
I'm still using quixote 1.2. (I vaguely remember some file upload  
class in 1.2 has a file size method I needed to use, so I didn't  
upgrade when 2.0 alpha was out. then our site went live and ain't- 
broken-don't-touch) And I'm not using the form framework. Need to be  
more flexible with the UI.

I tried to use straight unicode inside quixote, it worked, but it's  
too much hassle adding u' to every static string in ptl.  Since the  
easiest way to get unicode out of mysql is to execute "set names  
utf8" right after I get a connection, I decided to use utf-8 all the  
way.

So these are what I had to do to use utf-8 with quixote (again, this  
is v1.2):

1. In my publisher class, add:
          request.response.set_content_type('text/html; charset=utf-8')
     to start_request()

2. Add
      # -*- coding: UTF-8 -*-
     to every ptl file, and edit these with an utf-8 enabled editor.

and not exactly quixote per se:

3. In my site-wide html header ptl call, add:
          <meta http-equiv="Content-Type" content="text/html;  
charset=utf-8" />


pretty straight forward. I have not encountered any problem, other  
than wrestling with mysql's unicode implementation and adding encode/ 
decode when dealing with cElementtree which spits out unicode even  
though the xml files themselves are encoded in utf-8.

- bo

On Jul 31, 2005, at 1:02 AM, Neil Schemenauer wrote:

>
>
>> A big thank-you to the quixote team, by the way.
>>
>
> I see you are using utf-8 for your site.  Have you run into any
> Unicode Quixote problems?  I recently fixed a bug in the form
> framework but perhaps you don't use it.
>
>   Neil
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.