<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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px">
<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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px">
<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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px">
<font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><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="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div></div><div><br></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><div class="gmail_default" style="display:inline"></div><span style="font-family:arial;color:rgb(34,34,34)">---</span><br></div> vdagent/file_xfer.cpp | 13 ++++++++++++-<br>
1 file changed, 12 insertions(+), 1 deletion(-)<br><br>diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp<br>index e402eb2..1108369 100644<br>--- a/vdagent/file_xfer.cpp<br>+++ b/vdagent/file_xfer.cpp<br>@@ -46,6 +46,7 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage* start,<br>
uint64_t file_size;<br> HANDLE handle;<br> AsUser as_user;<br>+ int wlen;<br><br> status->id = start->id;<br> status->result = VD_AGENT_FILE_XFER_STATUS_ERROR;<br>@@ -81,7 +82,17 @@ void FileXfer::handle_start(VDAgentFileXferStartMessage* start,<br>
<br> strcat(file_path, "\\");<br> strcat(file_path, file_name);<br>- handle = CreateFileA(file_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);<br>+ if((wlen = MultiByteToWideChar(CP_UTF8, 0, file_path, -1, NULL, 0)) == 0)<br>
+ return;<br>+ TCHAR *wfile_path = (TCHAR*)malloc(sizeof(TCHAR) * (wlen + 1));<br>+ if (MultiByteToWideChar(CP_UTF8, 0, file_path, -1, wfile_path, wlen) == 0){<br>+ if(wfile_path)<br>+ free(wfile_path);<br>
+ return;<br>+ }<br>+ handle = CreateFile(wfile_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);<br>+ if (wfile_path)<br>+ free(wfile_path);<br> if (handle == INVALID_HANDLE_VALUE) {<br> vd_printf("failed creating %s %lu", file_path, GetLastError());<br>
return;<br><span class=""><font color="#888888">--<br>1.9.3<br></font></span><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>