Re: Why is the filesystemencoding needed for \origin lyx2lyx?

2016-06-13 Thread Enrico Forestieri
On Mon, Jun 13, 2016 at 09:38:07PM +0200, Georg Baum wrote:
> Enrico Forestieri wrote:
> 
> > On Sun, Jun 12, 2016 at 07:21:48PM +0200, Georg Baum wrote:
> > 
> >> Hi Enrico,
> >> 
> >> you added an encoding conversion in lyx2lyx here:
> >> http://www.lyx.org/trac/changeset/a0afd345/lyxgit
> >> 
> >> Can you please explain why this is needed, but not on windows?
> > 
> > According to my recollection, because on windows document.dir is
> > already in unicode format.
> 
> Thanks for the explanation. That means that my workaround for python3 is not 
> worse than the previous situation.
> 
> Unfortunately I fear that we have to adjust the encoding nevertheless:
> http://www.lyx.org/trac/ticket/10218
> http://www.lyx.org/trac/ticket/10220

I cannot reproduce both issues. Or, better, I can reproduce only if the
cygwin version of python comes first in the PATH. So, maybe it is due
to the fact that a wrong python is used for the conversion.

-- 
Enrico


Re: Why is the filesystemencoding needed for \origin lyx2lyx?

2016-06-13 Thread Georg Baum
Enrico Forestieri wrote:

> On Sun, Jun 12, 2016 at 07:21:48PM +0200, Georg Baum wrote:
> 
>> Hi Enrico,
>> 
>> you added an encoding conversion in lyx2lyx here:
>> http://www.lyx.org/trac/changeset/a0afd345/lyxgit
>> 
>> Can you please explain why this is needed, but not on windows?
> 
> According to my recollection, because on windows document.dir is
> already in unicode format.

Thanks for the explanation. That means that my workaround for python3 is not 
worse than the previous situation.

Unfortunately I fear that we have to adjust the encoding nevertheless:
http://www.lyx.org/trac/ticket/10218
http://www.lyx.org/trac/ticket/10220


Georg




Re: Why is the filesystemencoding needed for \origin lyx2lyx?

2016-06-12 Thread Enrico Forestieri
On Sun, Jun 12, 2016 at 07:21:48PM +0200, Georg Baum wrote:

> Hi Enrico,
> 
> you added an encoding conversion in lyx2lyx here:
> http://www.lyx.org/trac/changeset/a0afd345/lyxgit
> 
> Can you please explain why this is needed, but not on windows?

According to my recollection, because on windows document.dir is
already in unicode format.

-- 
Enrico


Why is the filesystemencoding needed for \origin lyx2lyx?

2016-06-12 Thread Georg Baum

Hi Enrico,

you added an encoding conversion in lyx2lyx here: 
http://www.lyx.org/trac/changeset/a0afd345/lyxgit


Can you please explain why this is needed, but not on windows? I ask 
because this conversion does not work with python 3: All strings, also 
the ones returned by os.path, are unicode strings in python 3, so if any 
conversion is needed we have to do it when filling the different members 
of the LyX class.


Georg