[Opentrep-svn] SF.net SVN: opentrep:[182] trunk/opentrep/gui/psp/opentrep.psp
Status: Beta
Brought to you by:
denis_arnaud
From: <den...@us...> - 2009-08-19 18:17:13
|
Revision: 182 http://opentrep.svn.sourceforge.net/opentrep/?rev=182&view=rev Author: denis_arnaud Date: 2009-08-19 18:17:01 +0000 (Wed, 19 Aug 2009) Log Message: ----------- [GUI] Added some charset-related elements in the produced HTML document. Modified Paths: -------------- trunk/opentrep/gui/psp/opentrep.psp Modified: trunk/opentrep/gui/psp/opentrep.psp =================================================================== --- trunk/opentrep/gui/psp/opentrep.psp 2009-08-19 16:15:17 UTC (rev 181) +++ trunk/opentrep/gui/psp/opentrep.psp 2009-08-19 18:17:01 UTC (rev 182) @@ -1,13 +1,16 @@ +<% print "Content-Type: text/html; charset=utf-8\n\n" %> + <% import os +from mod_python import apache + local_path = '/var/www/opentrep' -from mod_python import apache localize = apache.import_module('localize', path=[local_path]) log_service = apache.import_module('log_service', path=[local_path]) # defaults -msg, head, form_value, unrecognized = '', '', '', '' -#body_declaration = '<body>' +msg, form_value, original_form_value, unrecognized = '', '', '', '' +language = 'en' quiet = True # parsing: recognize sequence of three-letter codes @@ -16,6 +19,7 @@ queryStringForm = form if queryStringForm.has_key('data'): form_value = queryStringForm['data'] + original_form_value = form_value quiet = False if form_value.rstrip(' ') == '': pass @@ -47,12 +51,12 @@ %> -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= language %>" lang="<%= language %>"> <head> -<title>OpenTREP</title> -<%= head %> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <title>OpenTREP</title> </head> <body> @@ -74,7 +78,14 @@ </table> </div> -<p style="font-size:small;"><%= msg %></p> +<p style="font-size:small;"> + <%= msg %> +</p> +<p style="font-size:small;"> + Test to display UTF8-encoded text: Ивано-Франковск (ru_RU) - Івано-Франківськ (uk_UA) +<br>Original form value: <%= original_form_value %> +</p> + </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |