Having problems with the umlauts in Zope 2.6.0
Hi, in Zope 2.5.1 everything worked perfect. I stored texts in the string properties of my ZClasses with the special german characters (ä,ö,ü) and there weren't problems. Today I realized that when I tried to do it with my new Zope (2.6.0), it refuses to accept them. I look in the list and found that I could use: import sys sys.setdefaultencoding("latin-1") I put it in my z2.py script, but it says that sys doesn't havean attribute 'setdefaultencoding'. Even from the command line I get the same error. How can I solve this problem? Thanks in advanced, Josef
--On Freitag, 7. Februar 2003 10:48 +0100 Josef Meile <jmeile@hotmail.com> wrote:
Hi,
in Zope 2.5.1 everything worked perfect. I stored texts in the string properties of my ZClasses with the special german characters (ä,ö,ü) and there weren't problems.
Today I realized that when I tried to do it with my new Zope (2.6.0), it refuses to accept them. I look in the list and found that I could use:
import sys sys.setdefaultencoding("latin-1")
Put this inside sitecustomize.py and *not* in z2.py -aj
create it somewhere inside your python path. -aj --On Freitag, 7. Februar 2003 11:04 +0100 Josef Meile <jmeile@hotmail.com> wrote:
Put this inside sitecustomize.py and *not* in z2.py Thanks for your reply, but I didn't find this file. Where is it?
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
--------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
create it somewhere inside your python path. Hi, I put it in /usr/local/lib/python2.1/site-packages and tested it in the command line:
# /usr/local/bin/python2.1 Python 2.1.3 (#3, Jan 24 2003, 16:26:21) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information.
import sys sys.getdefaultencoding() 'latin-1'
Then I restarted zope and did my test: 1) Change a string property of my ZClass and write ö (I didn't have any problem here) 2) Create a instance of a ZClass and copy that value in a string property of this object. 3) Print the new string property value. I got: ?lass= So it means that the problem is still there. How can it be solved?
Hello, I posted a message earlier this week about using a selection in a propertysheet. This involved creating a second property with type "lines" that contained the actual choices for the selection. Since this property will show up on the edit form in the ZMI, I would like to put all these extra properties on a separate propertysheet. My problem is how to access this extra property with my choices from my original propertysheet, i.e. what do I need to put in the "value" input field for my selection property? Thanks in advance! Arjan Huijzer __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Arjan Huijzer wrote:
Hello,
I posted a message earlier this week about using a selection in a propertysheet. This involved creating a second property with type "lines" that contained the actual choices for the selection.
Since this property will show up on the edit form in the ZMI, I would like to put all these extra properties on a separate propertysheet.
My problem is how to access this extra property with my choices from my original propertysheet, i.e. what do I need to put in the "value" input field for my selection property?
You have Folder A containing a DTMLDocument B: Folder A -> Properties -> Add Property -> type = list, name = myreference , value = leave empty, then enter values into the list, Save DTMLDocument -> Properties -> Add Property -> type = selection, name=myselection, value = myreference And thats it... -mj
Maik, Thanks for your answer, but I forgot to mention that I am working with a ZClass. This ZClass has two propertysheets: A and B. What I would like to accomplish is put a property of type "selection" on propertysheet A that uses a property of type "lines" that is defined on propertysheet B. In the end the users will only be able to view/edit the properties on propertysheet A. Hopefully you (or someone else) can help me out here. Thanks in advance, Arjan Huijzer p.s. sorry --- Maik Jablonski <maik.jablonski@uni-bielefeld.de> wrote:
Arjan Huijzer wrote:
Hello,
I posted a message earlier this week about using a selection in a propertysheet. This involved creating a second property with type "lines" that contained the actual choices for the selection.
Since this property will show up on the edit form in the ZMI, I would like to put all these extra properties on a separate propertysheet.
My problem is how to access this extra property with my choices from my original propertysheet, i.e. what do I need to put in the "value" input field for my selection property?
You have Folder A containing a DTMLDocument B:
Folder A -> Properties -> Add Property -> type = list, name = myreference , value = leave empty, then enter values into the list, Save
DTMLDocument -> Properties -> Add Property -> type = selection, name=myselection, value = myreference
And thats it...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Arjan Huijzer wrote:
Maik,
Thanks for your answer, but I forgot to mention that I am working with a ZClass. This ZClass has two propertysheets: A and B. What I would like to accomplish is put a property of type "selection" on propertysheet A that uses a property of type "lines" that is defined on propertysheet B. In the end the users will only be able to view/edit the properties on propertysheet A.
Hopefully you (or someone else) can help me out here. Thanks in advance,
It will work just the same way. In your ZClass Product (inside Control_Panel), it will look broken and say (No value for *), but instances will work fine. Also, you do not need to preface the name of the source with the propertysheet; just give the name of the source list. -- Jim Washington
Josef Meile schrieb:
Put this inside sitecustomize.py and *not* in z2.py
Thanks for your reply, but I didn't find this file. Where is it?
You could also try PYTHON_PREFIX/lib/python/site.py, there's already a variable named "encoding"; you should be able to set it there. (Worked at least with "iso8859-1" for me.) Martin
On Friday 07 February 2003 10:02 am, Andreas Jung wrote:
--On Freitag, 7. Februar 2003 10:48 +0100 Josef Meile <jmeile@hotmail.com>
in Zope 2.5.1 everything worked perfect. I stored texts in the string properties of my ZClasses with the special german characters (ä,ö,ü) and there weren't problems.
Try 2.6.1 beta 1. A number of these problems have been resolved.
Today I realized that when I tried to do it with my new Zope (2.6.0), it refuses to accept them. I look in the list and found that I could use:
import sys sys.setdefaultencoding("latin-1")
That is dumb advice. sys.setdefaultencoding is a hack left over from python's early unicode development and is likely to be removed in a future version. -- Toby Dickenson http://www.geminidataloggers.com/people/tdickenson
Try 2.6.1 beta 1. A number of these problems have been resolved. Thanks for your reply.
I didn't like to use beta software in a production server, but I guess I don't have any other option. I just have a question more: Do you or anybody else have had any problem with this release?
On Friday 07 February 2003 11:07 am, Josef Meile wrote:
Try 2.6.1 beta 1. A number of these problems have been resolved.
Thanks for your reply.
I didn't like to use beta software in a production server, but I guess I don't have any other option. I just have a question more: Do you or anybody else have had any problem with this release?
Which release? You are not the only one to notice this problem in 2.6.0. I am currently using roughly 2.6.1 beta 2 in production. -- Toby Dickenson http://www.geminidataloggers.com/people/tdickenson
Which release? The one that you mentioned before: 2.6.1 beta 1
You are not the only one to notice this problem in 2.6.0. I am currently using roughly 2.6.1 beta 2 in production. I guess you're right and I will have to update my server again.
Thanks anyway.
Josef Meile wrote:
You are not the only one to notice this problem in 2.6.0. I am currently using roughly 2.6.1 beta 2 in production.
I guess you're right and I will have to update my server again.
I run 2.6.1 beta 2 (actually the current CVS 2.6-branch) in production, because I had much trouble with 2.6.0 and "german umlaute". 2.6.1b2 works without problems... as far as I can see...:) -mj
participants (7)
-
Andreas Jung -
Arjan Huijzer -
Jim Washington -
Josef Meile -
Maik Jablonski -
Martin Gebert -
Toby Dickenson