From mike.gabriel@das-netzwerkteam.de  Mon Sep  8 10:52:32 2014
Received: (at 566) by bugs.x2go.org; 8 Sep 2014 08:52:33 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	version=3.3.2
Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 4369C3D375
	for <566@bugs.x2go.org>; Mon,  8 Sep 2014 10:52:32 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98])
	by freya.das-netzwerkteam.de (Postfix) with ESMTPS id E8139165E;
	Mon,  8 Sep 2014 10:52:31 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id D54743BBAE;
	Mon,  8 Sep 2014 10:52:31 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id UqSUNbIpuYPg; Mon,  8 Sep 2014 10:52:31 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 9B4E83BA88;
	Mon,  8 Sep 2014 10:52:31 +0200 (CEST)
Received: from m-031.informatik.uni-kiel.de (m-031.informatik.uni-kiel.de
 [134.245.254.31]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP;
 Mon, 08 Sep 2014 08:52:31 +0000
Date: Mon, 08 Sep 2014 08:52:31 +0000
Message-ID: <20140908085231.Horde.tZmtZ8e1eNb9skDTZ2wjQg1@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: George Trakatelis <trakatelis@uom.edu.gr>, 566@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#566: Bug#566: X2Go Client for Windows 4.0.2.1
 cannot create C:\Users\<username>\ssh\known_hosts file when the local
 Windows account username has non-Ascii characters
References: <000001cfb552$3193a8a0$94baf9e0$@gr>
 <handler.566.B.140775428816658.ack@bugs.x2go.org>
 <000001cfc60a$32831de0$978959a0$@gr>
 <20140901195103.Horde.HOAd34FDzvE7MwwNBCtaAg1@mail.das-netzwerkteam.de>
 <CAMKht8gaM7uupVMhTkPR3pg2jcO5sBRHCbYkMV8kCf0EvKK8sg@mail.gmail.com>
 <CAMKht8jxisag8A9F3yFBSg3BQ+PODLzrayu90S0G8OaQKZXtfQ@mail.gmail.com>
 <000001cfca83$2b11d830$81358890$@edu.gr>
In-Reply-To: <000001cfca83$2b11d830$81358890$@edu.gr>
User-Agent: Internet Messaging Program (IMP) H5 (6.2.0)
Accept-Language: en,de
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 134.245.254.31
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101
 Firefox/32.0 Iceweasel/32.0
Content-Type: multipart/signed; boundary="=_ouvvwToruixnckrMAGByeQ2";
 protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0

This message is in MIME format and has been PGP signed.

--=_ouvvwToruixnckrMAGByeQ2
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Mike#2, hi George,

On  So 07 Sep 2014 12:04:51 CEST, George Trakatelis wrote:

> c. As toLocal8Bit() returns the local 8-bit representation of a string,
> I changed the system locale for non-unicode programs to German.
> Now the patch worked!
>
> I think the patch solves the problem for the Windows users who use Englis=
h
> as a foreign language and prefer having (non-Ascii) usernames in=20=20
>=20their native language.
>
> -George
>
> PS. A better title for the bug would be
>
> X2Go Client for Windows 4.0.2.1 cannot create=20=20
>=20C:\Users\<username>\ssh\known_hosts file when the local Windows=20=20
>=20account username has non-Ascii characters

Now that I think of it more thoroughly... Shouldn't we do a proper=20=20
encode/decode=20here so that we convert UTF-8 to Windows-CP1251 encoding=20=
=20
[1]?

Alternatively,=20one could work with filenames in UTF-16 as shown in=20=20
this=20[2] example.

I am not sure about the exact position in the code that bugs this up,=20=20
but=20I fear, the solution is non-trivial.

Either you need to detect the client-side encoding and convert between=20=
=20
UTF-8=20and that encoding, or we may consider addressing file names in=20=
=20
UTF-16=20(if that is possible in Qt).

Unfortunately, it seems that Windows uses different encodings at=20=20
different=20places (e.g. command.exe vs. Windows Explorer).

Just guessing after a little bit of internet research on this,
Mike#1


[1] http://comments.gmane.org/gmane.comp.lib.qt.general/39868
[2] https://www.mail-archive.com/subsurface@hohndel.org/msg00099.html


--=20

DAS-NETZWERKTEAM
mike=20gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x=
fb

--=_ouvvwToruixnckrMAGByeQ2
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJUDW5PAAoJEJr0azAldxsx8sIQALZg2HtWqkDukkxg1VrzaXcP
40Hp1XL/5wyTHZO5h7GN7LN7eEaVuzHUt85pmbSCJCIIPfFSqPbXyNmHej6mWN83
ONsl/uicI1nVQf/2e0KNghkTO1xyKRZrMySEepagsn5a6T5EVEjAqjv4cAITFw87
1FVHuKWA0BJ9axw4PLX2Dav2qepsTk89zOP/aQvDb338NEcHYUZJRKdYHYzCXYi9
jCa9R1QTrsFT6Jz6nwbWT4f0/1m0uJPq0Rkm/YlaRsP9KED7xy54eV2HzVh/3pYk
W2WmJICdLl7CLeyl+u7IJx9YqHw5xmQ+Zh6WrvbPtIncs3154DvXh6ovi0xVncHg
3zuGkVKYGOwPEeArAy36uyd5OPovE5jfCtmhV/o3s+YdMjSZK26FTW9//ULVEWuf
/ioXcLjLPVvVcFUUo7/SJDa2P91QR9BfQOQfyG+S0o7/AKmZ70GRRRjCYBseksu/
9gl4WRw+2jncpRwM2Ue754weJIceGZo84R7FIAs1HM1hebiPlC0WJntOCpeJnzEb
wZDYbnNhFWYzpI0SNFwc5E0/1v9OJvYuYDr9OxRdC35kHAxKRXxwvFdF7GwHAMYh
VEBvRSTumCN+HMEMgaaKPHwRW108U2NAafpqQquzuCCr5CirJzHMNGCrarAz5xHz
6i6Bl6Cv5cIEN0cHzhPb
=VzDv
-----END PGP SIGNATURE-----

--=_ouvvwToruixnckrMAGByeQ2--

