idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r80 - trunk/python/pydok/src/pydok
- Date: Fri, 2 May 2008 13:43:47 +0200
- List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
- List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>
Author: geus
Date: Fri May 2 13:43:46 2008
New Revision: 80
Log:
Changed ClientHandler.echoMessage(): now converts character data received
through CORBA from latin-1 to utf-8 encoding
Modified:
trunk/python/pydok/src/pydok/handler.py
Modified: trunk/python/pydok/src/pydok/handler.py
==============================================================================
--- trunk/python/pydok/src/pydok/handler.py (original)
+++ trunk/python/pydok/src/pydok/handler.py Fri May 2 13:43:46 2008
@@ -27,6 +27,9 @@
import pydok.security
+# Expected encoding of characters transmitted through CORBA
+CORBA_CHARACTER_ENCODING = "latin-1"
+
def query_username_password(realm):
"Ask for username and password and return a CredentialsType object"
print "Authentication for realm \"%s\"" % realm
@@ -122,8 +125,8 @@
self.idok_corba = idok_corba
self.file_out = file_out
def echoMessage(self, message):
- "Print a <message> to the user on the client side"
- self.file_out.write(message)
+ "Print a <message> to the user on the client side in utf-8 encoding"
+ self.file_out.write(unicode(message,
CORBA_CHARACTER_ENCODING).encode("utf-8"))
def getCredentials(self, kind, uri, realm):
"""Query credentials from the user that can be used to authenticate
to the DMS repository
"""
- [idok-commit] idok commit r80 - trunk/python/pydok/src/pydok, AFS account Roman Geus, 05/02/2008
Archive powered by MHonArc 2.6.19.