nuxeo-localizer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nuxeo-localizer] import from 0.8.1 to 1.0


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] import from 0.8.1 to 1.0
Date: Wed, 05 Mar 2003 17:08:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021204 Debian/1.2.1-1

Milos Prudek wrote:

Hello Juan,

Your reply consisted of only a single line:

This is a multi-part message in MIME format.



oohh ! I don't know what the hell I have done.. well, I will
rewrite my reply again..

Localizer 0.8.1 works with normal strings, Localizer 1.0 works
with unicode strings. Localizer 1.0 sets the (Localizer) management
screens to UTF-8.

The best solution is to write an external method that transforms
all your imported local content objects from normal strings encoded
in win-1250 to unicode strings:

 for x in list_of_localcontent_objects:
     local_properties = {}
     for id, v in x._local_properties.items():
         local_properties[id] = {}
         for lang, v in v.items():
             local_properties[id][lang] = unicode(v, 'cp1250')
     x._local_properties = local_properties

The code is untested but I think you get the idea.


Cheers,

--
J. David Ibáñez, http://www.j-david.net
Software Engineer / Ingénieur Logiciel / Ingeniero de Software






reply via email to

[Prev in Thread] Current Thread [Next in Thread]