I'm having some problems using ExternalEditor/gvim with umlauts. The irritating thing is that this is the first time this happens. Datapoints: 1. development server, zope 2.5.1 + ExternalEditor 0.5, mozilla 1.2.1 -> works 2. staging server, zope 2.5.1 + ExternalEditor 0.5, mozilla 1.2.1 -> doesn't work As one can see, the only difference is the server used (and the python version, though I think I build them both in the same fashion). Mozilla says that pages from Server 1 are ISO-8859-1 encoded, while the others are UTF-8 encoded, and seems to act accordingly: This happens when I post the dtml-method editing form with "äöü" as text in the two servers: 1. title=&data%3Atext=a%F6%FC&SUBMIT=Save+Changes 2. title=&data%3Atext=%C3%A4%C3%B6%C3%BC&SUBMIT=Save+Changes Seems mozilla sends this as UTF-8 in the second case, right? So, either I have to solve the mystery how to get rid of the UTF-8 encoding, or I have to find out how to teach external editor/gvim UTF-8. Any hints/comments? Thanks, oliver
On Mon, Feb 17, 2003 at 05:28:22PM +0100, Oliver Bleutgen wrote:
I'm having some problems using ExternalEditor/gvim with umlauts. The irritating thing is that this is the first time this happens. [...] So, either I have to solve the mystery how to get rid of the UTF-8 encoding, or I have to find out how to teach external editor/gvim UTF-8.
Any hints/comments?
I suggest that you use UTF-8, or you'll encounter additional problems later (e.g. when you find that you need the Euro sign somewhere). To edit UTF-8 text with gvim use the following settings: set encoding=UTF-8 set guifont=-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso10646-1 " any font with iso10646-1 enocoding will do set termencoding=ISO-8859-1 " depends on your locale, if you set " this wrong, you'll be able to see but " not type Marius Gedminas -- Codeworks is available for Zope consulting -- http://www.codeworks.lt/
Marius Gedminas wrote:
On Mon, Feb 17, 2003 at 05:28:22PM +0100, Oliver Bleutgen wrote:
I'm having some problems using ExternalEditor/gvim with umlauts. The irritating thing is that this is the first time this happens.
[...]
So, either I have to solve the mystery how to get rid of the UTF-8 encoding, or I have to find out how to teach external editor/gvim UTF-8.
Any hints/comments?
I suggest that you use UTF-8, or you'll encounter additional problems later (e.g. when you find that you need the Euro sign somewhere).
To edit UTF-8 text with gvim use the following settings:
set encoding=UTF-8 set guifont=-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso10646-1 " any font with iso10646-1 enocoding will do set termencoding=ISO-8859-1 " depends on your locale, if you set " this wrong, you'll be able to see but " not type
Marius Gedminas
Thanks for the hints. But the problem is that this method doesn't work when you have this mixed ISO-8859-1/UTF-8 situation. If I do what you describe here, the server which mozilla doesn't identify as UTF-8 enoding (the development server in my scenario) won't work. And seeing the problems talked about in zope-dev about zope's UTF-8 compability, I'm not sure I want to walk this road now for all servers here. cheers, oliver
Oliver Bleutgen kirjutas E, 17.02.2003 kell 19:10:
Thanks for the hints. But the problem is that this method doesn't work when you have this mixed ISO-8859-1/UTF-8 situation. If I do what you describe here, the server which mozilla doesn't identify as UTF-8 enoding (the development server in my scenario) won't work. And seeing the problems talked about in zope-dev about zope's UTF-8 compability, I'm not sure I want to walk this road now for all servers here.
You could hack zopeedit.py (the client-side helper app) to do the conversions for you. ----------- Hannu
On Mon, Feb 17, 2003 at 06:10:20PM +0100, Oliver Bleutgen wrote:
I suggest that you use UTF-8, or you'll encounter additional problems later (e.g. when you find that you need the Euro sign somewhere).
Thanks for the hints. But the problem is that this method doesn't work when you have this mixed ISO-8859-1/UTF-8 situation.
Can't you migrate to pure UTF-8?
If I do what you describe here, the server which mozilla doesn't identify as UTF-8 enoding (the development server in my scenario) won't work.
Yes, you need to set the Content-Type header. You could include this into standard_html_feader <dtml-call "request.RESPONSE.setHeader('Content-Type', 'text/html; charset=UTF-8')"> or do the equivalent thing from a PageTemplate macro.
And seeing the problems talked about in zope-dev about zope's UTF-8 compability, I'm not sure I want to walk this road now for all servers here.
I've been using UTF-8 data in Zope for a long time, and so far haven't experienced any problems. (Ok, there was one: in Zope 2.5 every inclusion of a page template used to override Content-Type, so setHeader had to be called near the bottom of the outermost PT. This is fixed in Zope 2.6.) Marius Gedminas -- Codeworks is available for Zope consulting -- http://www.codeworks.lt/
participants (3)
-
Hannu Krosing -
Marius Gedminas -
Oliver Bleutgen