View previous topic :: View next topic |
Author |
Message |
renoX
Joined: 08 Dec 2006 Posts: 2
|
Posted: Fri Dec 08, 2006 4:48 pm Post subject: [fixed] Bug: error on opening files with accent |
|
|
Hello,
first thanks for making this very nice program.
I'm reporting a bug in the forum, if you prefer me to open a ticket, say so, I'll open one.
I'm French and when I try to open a file which contain a letter with an accent in its filename, rulesPlayer cannot open it.
Version: rulesPlayer 0.84
I think that MPlayer version is 1.0RC1, it was downloaded by the installer with the codec.
The error message at the bottom is:
An error occured (seems like empty or unsupported files).
In the console:
rp| STDERR:
rp| C:\WINDOWS\fonts\arial.ttf doesn't look like a bitmap font description, ignoring.
rp| Cannot load bitmap font: C:\WINDOWS\fonts\arial.ttf
rp| File not found: 'F:\nd\Sophie Pétoncule - Chez le psychologue SF.mpg'
rp| Failed to open F:\nd\Sophie Pétoncule - Chez le psychologue SF.mpg.
Exiting... (End of file)
This error is show using File>Open file(s)..
Right-clicking brings an error popup: '4 invalid UTF8 sequence'.
If I remove the accent from the filename it opens ok, if the directory has an accent there is the same problem.
My Windows version is in French localisation.
I've tried to look at the sources, but I'm not much a Windows programmer
renoX
// variables
//
set v_framedrop "0"
set v_deinterlace "0"
set w_startfull "0"
set autodetectsequence "1"
set sub_autoplay "1"
set pl_autoplay "1"
set time "0"
set a_volume "30"
set god "0"
set mp_vo "directx"
set pl_shown "1"
set v_gamma "0"
set mp_path "mplayer\mplayer.exe"
set con_echo "1"
set speed "1"
set mp_more "$$?"
set v_aspectratio "0"
set pl_shuffle "0"
set sub_track "-1"
set v_expand "0"
set v_keepaspect "1"
set app_dir "C:\Program Files\rulesPlayer"
set mp_params "-pp $$v_pp -vo $$mp_vo -ao $$mp_ao -subcp $$sub_codepage -vf screenshot -nokeepaspect -zoom -brightness $$v_brightness -saturation $$v_saturation -contrast $$v_contrast -osdlevel 0 -colorkey 0x010001 -priority $$mp_priority -alang $$a_deflang -softvol -softvol-max $$mp_softvolmax $$mp_af -font $$mp_font -subfont-text-scale $$mp_textscale $$mp_more"
set w_fullscreen "0"
set v_hue "0"
set v_saturation "0"
set sub_deflang "en,bg"
set mp_cache "300"
set v_brightness "0"
set sensitivity "10"
set con_shown "0"
set pl_autoadvance "1"
set dvd_angle "0"
set mp_softvolmax "100.0"
set dvd_chapter "0"
set sub_alignment "2"
set v_pp "0"
set w_resizetomovie "1"
set sub_codepage "Windows-1251"
set con_echomp "1"
set con_height "333"
set osd_messages "2"
set mp_af "-af volnorm"
set sub_pos "100"
set w_ontop "0"
set mp_ao "win32"
set fileicon "1"
set v_contrast "0"
set a_track "0"
set windows_dir "C:\WINDOWS"
set v_idx "0"
set sub_shown "1"
set mp_font "\"$$windows_dir\fonts\arial.ttf\""
set a_deflang "en"
set w_mhidetime "1000"
set mp_cmdline "\"$$app_dir\$$mp_path\" $$mp_params"
set dvd_title "0"
set mp_textscale "3"
set a_mute "0"
set mp_priority "abovenormal"
set pl_repeat "1"
set osd_level "0"
set pl_height "333" |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Sat Dec 09, 2006 2:33 pm Post subject: |
|
|
Thank you for reporting the problem. The player has issues with non-English characters. I will look into that but currently I don't have the knowledge to fix. I will need to learn more about using none English in D/DWT, so it is not my priority for now. |
|
Back to top |
|
|
renoX
Joined: 08 Dec 2006 Posts: 2
|
Posted: Sat Dec 09, 2006 3:53 pm Post subject: |
|
|
Well, it isn't a very important bug either.
I'll have a look if I can, but I'm a newbie in D and in Windows programming which will make things "interesting".. |
|
Back to top |
|
|
Partyzan
Joined: 27 Dec 2006 Posts: 3
|
Posted: Wed Dec 27, 2006 6:18 am Post subject: |
|
|
Yes, I have this problem too - while opening file with russian chars(Win-1251, not Unicode) in path, player says "INVALID UTF-8 SEQUENCE" and exits.
Mplayer itself plays this file normally. Text of error absents in rulesPlayer sources but presents in exe. I think that it is not player code error, but somewhere in D compiler.
I search for this error and found this topic:
http://www.digitalmars.com/d/archives/digitalmars/D/9011.html
but it's not the same
And how to workaround this bug? |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Wed Dec 27, 2006 12:26 pm Post subject: |
|
|
Hmmm... I was able to open a file with cyrillic characters in the name. Maybe it was a bug The workaround is to rename the file or try dropping the file from explorer... And it is not the D compiler. D wants UTF and cp1251 is not UTF... |
|
Back to top |
|
|
Partyzan
Joined: 27 Dec 2006 Posts: 3
|
Posted: Wed Dec 27, 2006 1:53 pm Post subject: |
|
|
Yes, I was try drop file to player window - error message appearing but video plays with logo in center of the window. Looks funny :-)
Try to make cyrillic symbols in path, not in filename. For example, c:\video\ôèëüì\Film1.avi
By the way, where you get file names in cp1251? |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Thu Dec 28, 2006 2:03 pm Post subject: |
|
|
Partyzan wrote: | By the way, where you get file names in cp1251? |
I am Bulgarian. |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Tue Jan 02, 2007 7:15 am Post subject: |
|
|
The problem is fixed now. The fix will be in the next release (0.8. Let me know if anyone needs it sooner. |
|
Back to top |
|
|
Partyzan
Joined: 27 Dec 2006 Posts: 3
|
Posted: Wed Jan 10, 2007 10:39 pm Post subject: |
|
|
Wow! Thanks. |
|
Back to top |
|
|
FoX
Joined: 20 Jan 2007 Posts: 11
|
Posted: Sat Jan 20, 2007 2:26 pm Post subject: |
|
|
When I try to open file with russian letter "ÿ" (0xFF) in path, I have message box with error "ArayBoundsError player(401)". But with other cyrillic letters all ok.
rulesPlayer 0.92 |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Sat Jan 20, 2007 3:16 pm Post subject: |
|
|
FoX wrote: | When I try to open file with russian letter "ÿ" (0xFF) in path, I have message box with error "ArayBoundsError player(401)". But with other cyrillic letters all ok.
rulesPlayer 0.92 |
I can confirm that. It seems it is problem in MPlayer itself. If you start mplayer from the command line with something like "mplayer movieÿ.avi" it plays ok but the output line that says "Playing movieÿ.avi" is screwed after the ÿ character... |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Sat Jan 20, 2007 3:59 pm Post subject: |
|
|
Isn't 0xFF an invalid UTF8 codepoint/character/whatever? According to http://digitalmars.com/d/type.html, it's the default initializer for char, so I'd say it's not supposed to be valid. Just a guess... |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Sun Jan 21, 2007 10:10 am Post subject: |
|
|
ÿ is 0xFF in CP1251 not in unicode. |
|
Back to top |
|
|
FoX
Joined: 20 Jan 2007 Posts: 11
|
Posted: Mon Jan 22, 2007 11:24 am Post subject: |
|
|
Player is really rules! It is the best gui for mplayer I've seen.
It will be even more rules if you do something with this error. Handle exception, check array length ...etc. I think russian users will be thankfull for that.
(sry for my english) |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Jan 22, 2007 1:13 pm Post subject: |
|
|
Please do the following test. Open the console (run/cmd) and go to the mplayer folder. Something like that cd "c:\program files\rulesplayer\mplayer" and then start mplayer from there with something like mplayer "c:\path\to\movie\with_ÿ_letter.avi" and pay attention to output in the console. There should be line saying something like "Playing with_ÿ_letter.avi... ". See if it is OK. If the name of the file appears OK for you, then it is probably problem in my code, if it appears screwed up then you need to report to the guys making mplayer (here http://www.mplayerhq.hu/design7/mailing_lists.html). When I do the above I get the following output "Playing c:\downloads\test\pme-promise-cd1ÿ¨þñð .avi." and it should say "Playing c:\downloads\test\pme-promise-cd1ïðîáàÿ.avi." . Anyway I will provide a workaround in the next release but this is not really a solution... |
|
Back to top |
|
|
|