[Opentrep-svn] SF.net SVN: opentrep:[193] trunk/opentrep/test/i18n/icu/pytolower.py
Status: Beta
Brought to you by:
denis_arnaud
From: <den...@us...> - 2009-09-26 21:43:08
|
Revision: 193 http://opentrep.svn.sourceforge.net/opentrep/?rev=193&view=rev Author: denis_arnaud Date: 2009-09-26 21:42:53 +0000 (Sat, 26 Sep 2009) Log Message: ----------- [i18n] Added a working Python Unicode sample, transforming a user input string into lowercases. Added Paths: ----------- trunk/opentrep/test/i18n/icu/pytolower.py Added: trunk/opentrep/test/i18n/icu/pytolower.py =================================================================== --- trunk/opentrep/test/i18n/icu/pytolower.py (rev 0) +++ trunk/opentrep/test/i18n/icu/pytolower.py 2009-09-26 21:42:53 UTC (rev 193) @@ -0,0 +1,12 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +query = u'ЙЦУКЕНГШЩЗХЪ ФЫВАПРОЛДЖЭ ЯЧСМИТЬБЮ Ё ЇІЄ' +query_input = raw_input() +if query_input != '': + query = unicode(query_input,encoding='utf-8') + +print 'Original query: ' + query +print 'Lower-cased query: ' + query.lower() +print 'Upper-cased query: ' + query.upper() + '\n' + Property changes on: trunk/opentrep/test/i18n/icu/pytolower.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |