projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dc39ddf
)
Affichage du nom de famille en majuscules (traitement des noms en unicode pour une...
author
Benoît Pin
<pin@cri.ensmp.fr>
Mon, 4 Jul 2011 09:40:11 +0000
(11:40 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Mon, 4 Jul 2011 09:40:11 +0000
(11:40 +0200)
utils.py
patch
|
blob
|
history
diff --git
a/utils.py
b/utils.py
index
e867b0d
..
863b94e
100755
(executable)
--- a/
utils.py
+++ b/
utils.py
@@
-87,15
+87,17
@@
def capitalizeCompoundGivenName(givenName) :
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
- memberFullName = ''
+ memberName = memberName.decode('utf-8')
+ memberGivenName = memberGivenName.decode('utf-8')
+ memberFullName = u''
if memberName and memberGivenName :
if nameBefore :
if memberName and memberGivenName :
if nameBefore :
- memberFullName = memberName.
capitalize
() + ' ' + capitalizeCompoundGivenName(memberGivenName)
+ memberFullName = memberName.
upper
() + ' ' + capitalizeCompoundGivenName(memberGivenName)
else :
else :
- memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.
capitalize
()
+ memberFullName = capitalizeCompoundGivenName(memberGivenName) + ' ' + memberName.
upper
()
elif memberName and not memberGivenName :
elif memberName and not memberGivenName :
- memberFullName = memberName.
capitalize
()
+ memberFullName = memberName.
upper
()
elif not memberName and memberGivenName :
memberFullName = capitalizeCompoundGivenName(memberGivenName)
elif not memberName and memberGivenName :
memberFullName = capitalizeCompoundGivenName(memberGivenName)
@@
-103,7
+105,7
@@
def formatFullName(memberName, memberGivenName, memberId, nameBefore=1) :
else :
memberFullName = memberId
else :
memberFullName = memberId
- return memberFullName
+ return memberFullName
.encode('utf-8')
# from OFS.ObjectManager #63
bad_url_chars = re.compile(r'[^a-zA-Z0-9-_~,.$\(\)@]')
# from OFS.ObjectManager #63
bad_url_chars = re.compile(r'[^a-zA-Z0-9-_~,.$\(\)@]')