Christoph Zwerschke wrote on 6/30/07 12:40 AM:
> Do we want to offer something like this as the default? The encoding 
> attribute could be set to a configurable (via Application.config) 
> default such as 'utf-8', and could be used in other places as well. For 
> instance, the Page class could write a content-type meta tag with the 
> inherited attribute of HTTPContent in its writeMetaData method. And of 
> course it could be overwritten by individual servlets.
>
>   
I don't see a need for it in the Page class. How about implementing it 
in an example UnicodePage.py similar to the example SidebarPage.py?

It seems like the main reason for using unicode objects would be to 
display various character sets for any page - otherwise why not simply 
use strings in the global character set of choice? If that assumption is 
true, then it makes more sense to have the character set configurable 
per servlet transaction, determined by whatever business logic decides 
the correct character set based on the user's request. Because this 
would be dependent on the web application, I think having some function 
on the UnicodePage which returns the character set for the servlet 
transaction would be more useful than an application-wide setting.

> I personally avoid using unicode in Webware; instead I write my servlets 
> in latin-1 or utf-8, add a content-type tag to my base class and a 
> "coding:" line at the top of my servlets, use the same encoding in the 
> database and everythign fits together, with no unicode objects around.
>
>   
I agree. On our multilingual projects, we use UTF-8 strings everywhere. 
One character set for all the languages, very simple.


- Ben

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to