Re: [Musicpd-dev-team] rename playlist name(Chinese characters) issue on Windows 7
This looks like a limitation of windows port. There are some conceptual differences in filename handling between windows and Unix-like operating systems. For now MPD can only deal with filenames that can be represented using default windows encoding. It's selected via Language for non-Unicode programs setting in control panel. 02.06.2012 14:16, zw g написал: Ooh, forget to tell that if i do the same operation on Linux/Mac OS X. There is no problem at all. So it is a Windows-Specific question. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] rename playlist name(Chinese characters) issue on Windows 7
And for the unicode thing: In [3]: old_playlist_name = u大 # Which is a Chinese character, means 'Big' in English.In [4]: old_playlist_nameOut[4]: u'\u5927' The playlist name i passed it is unicode already. On Sat, Jun 2, 2012 at 4:38 PM, zw g pekingmas...@gmail.com wrote: Thank you Denis. But the odd thing is: I can Save playlist name in Chinese characters. (Although they displayed in non-readable form in the playlists folder) In [8]: client.save(old_playlist_name) In [9]: client.listplaylists()Out[9]: [{u'last-modified': u'2012-05-26T09:11:01Z', u'playlist': u'\u5927'}] But i can not rename it. On Sat, Jun 2, 2012 at 4:30 PM, Denis Krjuchkov de...@crazydev.netwrote: This looks like a limitation of windows port. There are some conceptual differences in filename handling between windows and Unix-like operating systems. For now MPD can only deal with filenames that can be represented using default windows encoding. It's selected via Language for non-Unicode programs setting in control panel. 02.06.2012 14:16, zw g написал: Ooh, forget to tell that if i do the same operation on Linux/Mac OS X. There is no problem at all. So it is a Windows-Specific question. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] rename playlist name(Chinese characters) issue on Windows 7
02.06.2012 14:38, zw g написал: But the odd thing is: I can Save playlist name in Chinese characters. (Although they displayed in non-readable form in the playlists folder) In [8]: client.save(old_playlist_name) In [9]: client.listplaylists() Out[9]: [{u'last-modified': u'2012-05-26T09:11:01Z', u'playlist': u'\u5927'}] Ok, I've just looked at source of MPD and glib and it seems there is a bug lies in between. MPD uses g_filetest() function to check if file really exists, but glib redefines g_filetest to be actually g_filetest_utf8(), which expected file name to be in UTF-8 instead of windows default encoding. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] rename playlist name(Chinese characters) issue on Windows 7
Thanks for you explanation. Should i fire a bug to the bug report site? Or just do some workaround? On Sat, Jun 2, 2012 at 5:09 PM, Denis Krjuchkov de...@crazydev.net wrote: 02.06.2012 14:38, zw g написал: But the odd thing is: I can Save playlist name in Chinese characters. (Although they displayed in non-readable form in the playlists folder) In [8]: client.save(old_playlist_name) In [9]: client.listplaylists() Out[9]: [{u'last-modified': u'2012-05-26T09:11:01Z', u'playlist': u'\u5927'}] Ok, I've just looked at source of MPD and glib and it seems there is a bug lies in between. MPD uses g_filetest() function to check if file really exists, but glib redefines g_filetest to be actually g_filetest_utf8(), which expected file name to be in UTF-8 instead of windows default encoding. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] rename playlist name(Chinese characters) issue on Windows 7
Done. The bug report is here: http://www.musicpd.org/mantis/view.php?id=3504 Please kindly change it's states when it gets fixed. Thank you very much, Denis. On Sat, Jun 2, 2012 at 6:40 PM, Denis Krjuchkov de...@crazydev.net wrote: 02.06.2012 15:55, zw g написал: Should i fire a bug to the bug report site? Yep, I'll likely to fix that myself, but record in bug tracker would be useful anyway. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team