<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><div class="gmail_default"><div class="gmail_default" style="display:inline"></div><span style="font-family:arial,helvetica,sans-serif;font-size:12.800000190734863px">I submitted a patch several months ago about this issue,</span></div>
<div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="arial, helvetica, sans-serif">here <a href="http://lists.freedesktop.org/archives/spice-devel/2014-February/016158.html" target="_blank">http://lists.freedesktop.org/archives/spice-devel/2014-February/016158.html</a></font></div>
<div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif">
<font color="#000000" face="arial, helvetica, sans-serif">I check it again, and find that the value of g_key_file_to_data(keyfile,...) is always utf-8,</font></div><div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif">
<font color="#000000" face="arial, helvetica, sans-serif">for the value of g_uri_list_extract_uris() is utf8 urlencode.</font></div><div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif">
<font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="arial, helvetica, sans-serif">So the display problem is </font><span style="color:rgb(0,0,0);font-family:'Microsoft YaHei';white-space:nowrap">caused by vd_agent, but how it displays depends on the</span></div>
<div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><span style="color:rgb(0,0,0);font-family:'Microsoft YaHei';white-space:nowrap">language of system, the following two screenshots show the difference:</span></div>
<div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="Microsoft YaHei"><span style="white-space:nowrap"><a href="http://int64ago-tmp.qiniudn.com/guest-Chinese.png" target="_blank">http://int64ago-tmp.qiniudn.com/guest-Chinese.png</a></span></font><br>
</div><div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="Microsoft YaHei"><span style="white-space:nowrap"><a href="http://int64ago-tmp.qiniudn.com/guest-English.png" target="_blank">http://int64ago-tmp.qiniudn.com/guest-English.png</a></span></font></div>
<div class="gmail_default" style="font-size:12.800000190734863px;color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#000000" face="Microsoft YaHei"><br></font></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">
<div class="gmail_default" style="display:inline"></div><span style="color:rgb(34,34,34);font-family:arial">---</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> vdagent/file_xfer.cpp | 16 +++++++++++++++-</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial"> 1 file changed, 15 insertions(+), 1 deletion(-)</span><br style="color:rgb(34,34,34);font-family:arial"><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">index e402eb2..96b7394 100644</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">--- a/vdagent/file_xfer.cpp</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+++ b/vdagent/file_xfer.cpp</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">@@ -46,6 +46,7 @@ void FileXfer::handle_start(</span><span style="color:rgb(34,34,34);font-family:arial">VDAgentFileXferStartMessage* start,</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial"> uint64_t file_size;</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> HANDLE handle;</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial"> AsUser as_user;</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ int wlen;</span><br style="color:rgb(34,34,34);font-family:arial">
<br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> status->id = start->id;</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> status->result = VD_AGENT_FILE_XFER_STATUS_</span><span style="color:rgb(34,34,34);font-family:arial">ERROR;</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">@@ -81,7 +82,20 @@ void FileXfer::handle_start(</span><span style="color:rgb(34,34,34);font-family:arial">VDAgentFileXferStartMessage* start,</span><br style="color:rgb(34,34,34);font-family:arial">
<br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> strcat(file_path, "\\");</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> strcat(file_path, file_name);</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">- handle = CreateFileA(file_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ if((wlen = MultiByteToWideChar(CP_UTF8, 0, file_path, -1, NULL, 0)) == 0){</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ vd_printf("failed getting WideChar length of %s", file_path);</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ return;</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ }</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ TCHAR *wfile_path = new TCHAR[wlen];</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ if (MultiByteToWideChar(CP_UTF8, 0, file_path, -1, wfile_path, wlen) == 0){</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ vd_printf("failed converting file_path:%s to WindChar", file_path);</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ if (wfile_path)</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ delete[] wfile_path;</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ return;</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ }</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ handle = CreateFile(wfile_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial">+ if (wfile_path)</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial">+ delete[] wfile_path;</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> if (handle == INVALID_HANDLE_VALUE) {</span><br style="color:rgb(34,34,34);font-family:arial">
<span style="color:rgb(34,34,34);font-family:arial"> vd_printf("failed creating %s %lu", file_path, GetLastError());</span><br style="color:rgb(34,34,34);font-family:arial"><span style="color:rgb(34,34,34);font-family:arial"> return;</span><br style="color:rgb(34,34,34);font-family:arial">
<span class="" style="color:rgb(34,34,34);font-family:arial"><font color="#888888">--<br>1.9.3<br></font></span></div></div><div><br></div>-- <br><div dir="ltr"><font color="#cfe2f3">Q</font><font color="#9fc5e8">S</font><font color="#6fa8dc">B</font><font color="#3d85c6">D</font><font color="#0b5394">T</font><font color="#073763">0</font><font color="#0c343d">R</font><font color="#134f5c">F</font><font color="#45818e">U</font><font color="#76a5af">i</font><font color="#a2c4c9">B</font><font color="#d0e0e3">G</font><font color="#d9ead3">U</font><font color="#b6d7a8">k</font><font color="#93c47d">9</font><font color="#6aa84f">N</font><font color="#38761d">I</font><font color="#274e13">F</font><font color="#7f6000">J</font><font color="#bf9000">J</font><font color="#f1c232">R</font><font color="#ffd966">V</font><font color="#ffe599">N</font><font color="#fff2cc">U</font><font color="#fce5cd">I</font><font color="#f9cb9c">E</font><font color="#f6b26b">9</font><font color="#e69138">G</font><font color="#b45f06">I</font><font color="#783f04">E</font><font color="#660000">N</font><font color="#990000">U</font><font color="#cc0000">U</font><font color="#e06666">0V</font><font color="#ea9999">V</font></div>
</div>