[MPlayer-users] GMPlayer (not only) open-file dialog encoding problem

Oldrich Jedlicka oldium.pro at seznam.cz
Sat Dec 13 16:13:38 CET 2003


Hello,

I found problem in mplayer GUI (version 1.0_pre3), file Gui/mplayer/gtk/fs.c. It doesn't convert filenames to UTF-8 (my system runs on ISO-8859-2), so opening goes good, but showing filename is buggy (pango warnings on console). I tried to fix it but I found another problem there - memory allocations. Variable fsSelectedDirectory can hold string, that needs to be freed (when assigned from get_current_dir_name), or a string, that needs not to be freed (assigned from fsSelectedFile/constant "."). Memory freeing is completely ignored in this case (because nobody knows if it can be freed).

I've made a conversion part of fs.c (from codepage taken from LC_CTYPE to UTF-8 and back using iconv). I don't have time and knowledge in GTK enough to complete task. Code is attached.

I mean the best way to handle conversion is to keep two lists - one to show (converted to UTF-8), one to use for chdir() and file-opening (obtained from glob).

Name of opened file is buggy in main window too. So keep two file-name variables across gmplayer: native and UTF-8.

I hope this post was useful. Anyone wants to continue?

Regards,

  Oldrich Jedlicka.
____________________________________________________________
Eurotel Data Nonstop  - neomezený přístup na internet za 649,- (s DPH 681,45)  Kč měsíčně! http://ad2.seznam.cz/redir.cgi?instance=67071%26url=http://www.eurotel.cz/site/cz/servicesAndTariffs/specialOffer.html?list=34995

-------------- next part --------------
A non-text attachment was scrubbed...
Name: conversion.c
Type: application/octet-stream
Size: 3033 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20031213/ecc071fb/attachment.obj>


More information about the MPlayer-users mailing list