Jump to content

System.ArgumentException: 'windows1252' is not a supported encoding name is thrown when playing with Hungarian subtitles


belidzs

Recommended Posts

I have recently started up a portable Emby server on a Windows 10 machine. Everything works great except the subtitles.

 

How to reproduce the problem:

  1. Login to web client
  2. Select a video file with an external Hungarian subtitle (ending has to be .hun.srt)
  3. Play
  4. Select subtitle to show

I would expect the subtitle to display. Instead, no error message appears and there are no subtitles at all.

 

I have found the following relevant stack trace in the logs:

	*** Error Report ***
	Version: 3.2.33.0
	Command line: C:\Users\belidzs\emby\system\EmbyServer.dll C:\Users\belidzs\emby\system\EmbyServer.dll
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 4
	Program data path: C:\Users\belidzs\emby\programdata
	Application directory: C:\Users\belidzs\emby\system
	System.ArgumentException: 'windows1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
	Parameter name: name
	   at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)
	   at System.Globalization.EncodingTable.GetCodePageFromName(String name)
	   at System.Text.Encoding.GetEncoding(String name)
	   at Emby.Server.Implementations.TextEncoding.TextEncoding.GetEncodingFromCharset(String charset)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitleStream>d__18.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitleStream>d__17.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitles>d__16.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at MediaBrowser.Api.Subtitles.SubtitleService.<Get>d__9.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.Services.ServiceExecGeneral.<Execute>d__2.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.<ProcessRequestAsync>d__15.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__72.MoveNext()
	System.ArgumentException
	   at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)
	   at System.Globalization.EncodingTable.GetCodePageFromName(String name)
	   at System.Text.Encoding.GetEncoding(String name)
	   at Emby.Server.Implementations.TextEncoding.TextEncoding.GetEncodingFromCharset(String charset)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitleStream>d__18.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitleStream>d__17.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.<GetSubtitles>d__16.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at MediaBrowser.Api.Subtitles.SubtitleService.<Get>d__9.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.Services.ServiceExecGeneral.<Execute>d__2.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.<ProcessRequestAsync>d__15.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__72.MoveNext()
Link to comment
Share on other sites

It should be resolved for the next release, thanks.

Thank you!

 

Edit: I realized there was a beta available, so I have updated to 3.2.33.17-beta and I can confirm that the issue is gone.

Edited by belidzs
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...