[ubuntu-mono] [Bug 881319] [NEW] gnome-subtitles crashes when trying to save file in CP866 and can't open files with encoding CP1251, CP866

tolostoi tolostoi at gmail.com
Tue Oct 25 09:09:30 UTC 2011


Public bug reported:

I use Ubuntu 11.10, when try to open a .srt file with encodnig CP1251, I recieve this message:
Could not open the file test.srt.
The encoding used is not supported by your system. Please choose another encoding.
Command locale:
LANG=bg_BG.UTF-8
LANGUAGE=bg_BG:en
LC_CTYPE=bg_BG.UTF-8
LC_NUMERIC="bg_BG.UTF-8"
LC_TIME="bg_BG.UTF-8"
LC_COLLATE=bg_BG.UTF-8
LC_MONETARY="bg_BG.UTF-8"
LC_MESSAGES=bg_BG.UTF-8
LC_PAPER="bg_BG.UTF-8"
LC_NAME="bg_BG.UTF-8"
LC_ADDRESS="bg_BG.UTF-8"
LC_TELEPHONE="bg_BG.UTF-8"
LC_MEASUREMENT="bg_BG.UTF-8"
LC_IDENTIFICATION="bg_BG.UTF-8"
LC_ALL=

 cat /var/lib/locales/supported.d/local
bg_BG.UTF-8 UTF-8
en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8
ru_RU.KOI8-R KOI8-R
ru_RU ISO-8859-5
bg_BG CP1251
ru_RU.CP1251 CP1251

When open witth gedit is OK -->save as, and choose the UTF8 encoding, then open with gnome subtitles it works, now save as from gnome subtitles menu, and choose encoding CP866 it crashes. The output of crash is:
Got 9 languages.
Detected encodings: UTF-8 GB18030 Big5
Trying the encoding utf-8
Trying to autodetect the subtitle format.
[*] opened /home/tolostoi/Плот/test.srt with encoding System.Text.UTF8Encoding and format SubRip

(gnome-subtitles:9435): Gtk-WARNING **: Unable to retrieve the file info for `file:///home/tolostoi/%D0%9F%D0%BB%D0%BE%D1%82/test-2.srt': Грешка при получаване на състоянието на файл „/home/tolostoi/Плот/test-2.srt“: Няма такъв файл или директория
Marshaling activate signal
Gnome Subtitles version: 1.1
GtkSharp version: 2.12
GladeSharp version: 2.12
GConfSharp version: 2.24

Stack trace:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: CodePage 866 not supported
  at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0 
  at GnomeSubtitles.Ui.MainUi.ShowSaveAsDialog (GnomeSubtitles.Dialog.SubtitleFileSaveAsDialog dialog) [0x00000] in <filename unknown>:0 
  at GnomeSubtitles.Ui.MainUi.SaveAs () [0x00000] in <filename unknown>:0 
  at GnomeSubtitles.Core.EventHandlers.OnFileSaveAs (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0 

Just for the record, when saving file on path that where there is no
Cyrillic saving OK, but problem with opening subtitles in CP1251 stil
exist.

** Affects: gnome-subtitles (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: cp1251 cp866 subtitles

-- 
You received this bug notification because you are a member of Ubuntu
CLI/Mono Uploaders, which is subscribed to gnome-subtitles in Ubuntu.
https://bugs.launchpad.net/bugs/881319

Title:
  gnome-subtitles crashes when trying to save file in CP866 and can't
  open files with encoding CP1251, CP866

Status in “gnome-subtitles” package in Ubuntu:
  New

Bug description:
  I use Ubuntu 11.10, when try to open a .srt file with encodnig CP1251, I recieve this message:
  Could not open the file test.srt.
  The encoding used is not supported by your system. Please choose another encoding.
  Command locale:
  LANG=bg_BG.UTF-8
  LANGUAGE=bg_BG:en
  LC_CTYPE=bg_BG.UTF-8
  LC_NUMERIC="bg_BG.UTF-8"
  LC_TIME="bg_BG.UTF-8"
  LC_COLLATE=bg_BG.UTF-8
  LC_MONETARY="bg_BG.UTF-8"
  LC_MESSAGES=bg_BG.UTF-8
  LC_PAPER="bg_BG.UTF-8"
  LC_NAME="bg_BG.UTF-8"
  LC_ADDRESS="bg_BG.UTF-8"
  LC_TELEPHONE="bg_BG.UTF-8"
  LC_MEASUREMENT="bg_BG.UTF-8"
  LC_IDENTIFICATION="bg_BG.UTF-8"
  LC_ALL=

   cat /var/lib/locales/supported.d/local
  bg_BG.UTF-8 UTF-8
  en_US.UTF-8 UTF-8
  ru_RU.UTF-8 UTF-8
  ru_RU.KOI8-R KOI8-R
  ru_RU ISO-8859-5
  bg_BG CP1251
  ru_RU.CP1251 CP1251

  When open witth gedit is OK -->save as, and choose the UTF8 encoding, then open with gnome subtitles it works, now save as from gnome subtitles menu, and choose encoding CP866 it crashes. The output of crash is:
  Got 9 languages.
  Detected encodings: UTF-8 GB18030 Big5
  Trying the encoding utf-8
  Trying to autodetect the subtitle format.
  [*] opened /home/tolostoi/Плот/test.srt with encoding System.Text.UTF8Encoding and format SubRip

  (gnome-subtitles:9435): Gtk-WARNING **: Unable to retrieve the file info for `file:///home/tolostoi/%D0%9F%D0%BB%D0%BE%D1%82/test-2.srt': Грешка при получаване на състоянието на файл „/home/tolostoi/Плот/test-2.srt“: Няма такъв файл или директория
  Marshaling activate signal
  Gnome Subtitles version: 1.1
  GtkSharp version: 2.12
  GladeSharp version: 2.12
  GConfSharp version: 2.24

  Stack trace:
  System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: CodePage 866 not supported
    at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0 
    at GnomeSubtitles.Ui.MainUi.ShowSaveAsDialog (GnomeSubtitles.Dialog.SubtitleFileSaveAsDialog dialog) [0x00000] in <filename unknown>:0 
    at GnomeSubtitles.Ui.MainUi.SaveAs () [0x00000] in <filename unknown>:0 
    at GnomeSubtitles.Core.EventHandlers.OnFileSaveAs (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0 
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
    at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
    at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
    at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 
    at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
    at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
    at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0 

  Just for the record, when saving file on path that where there is no
  Cyrillic saving OK, but problem with opening subtitles in CP1251 stil
  exist.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-subtitles/+bug/881319/+subscriptions



More information about the Ubuntu-mono mailing list