[Zope] What's "decodestring" in User.py line 388 for? or Begging a step for
Internationaliztion.
Internationaliztion.
LEE, Kwan Soo
kslee@plaza1.snu.ac.kr
Mon, 08 Feb 1999 21:44:02 +0900
This is a multi-part message in MIME format.
--------------F98CF6D4F428464E1E6C994F
Content-Type: text/plain; charset=EUC-KR
Content-Transfer-Encoding: 7bit
I've got an binascii.Error as the attached file. What I did was to get
this error is the following.
1. Adding to a user folder a 'New User' whose id is composed of
non-ascii characters. And there were no errors(this is true when I did
the same to a user db).
2. Trying to access manage page as that 'New User'
What I can see from the source code is 'v'(=validate) in User.py line
388 calls python builtin module base64. And since base64 is 'built-in'
and I'm an awfull newbie, I can not guess what is v, decodestring, and
base64 do(Obviously, 'v' get name & password for authentication).
Ansorry situation. I wish Guido had implemented base64 in python not in
C. ....
So if anybody knows what v does with what kind of data reveal his sacred
knowledge, I'd like to write a python bits to solve this problem(for
those with non-ascii character names).
I suggest this will be the 1st step for internalization of Zope(though
only two guy from Chech & France and me seems interested in that). Quite
weeks ago, I did some ugly hack to circumvent a id checking method to be
able to add object whose id is composed of non-ascii characters. For IE
and Netscape Korean version, there was no problem with that hack. But
now I abandoned it, 'cause it's non-standard to use non-ascii chars in
URL(very sorry situation though :(. But user's name is not a object id
but a part of qurry string. So it seems(at least to me) not a violation
of the standard. Being able to type in one's own name in his or her own
language is very^3 user-friendly, don't you think so?
for Zopal revelation, LEE Kwan Soo.
--------------F98CF6D4F428464E1E6C994F
Content-Type: text/html; charset=EUC-KR;
name="manage.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="manage.html"
<html>
<head>
<title>binascii.Error</title>
</head>
<body>
Sorry, an error occurred.<p>
<PRE>
Traceback (innermost last):
File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 879, in publish_module
File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 520, in publish
(Info: /manage)
File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/AccessControl/User.py, line 388, in validate
(Object: Navigation)
File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python1.5/base64.py, line 46, in decodestring
File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python1.5/base64.py, line 32, in decode
Error: Incorrect padding
</PRE>
</body>
</html>
--------------F98CF6D4F428464E1E6C994F--