C# string functions that are culture specific #334

Closed
opened 2026-02-06 19:35:44 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @EraYaN on GitHub (Jan 26, 2019).

Describe the bug
Some string functions might be culture specific, causing issues or unintended behaviour if the culture is not handled properly.

In stead of an XML export I tried the text export this time:

Solution MediaBrowser.sln
    Project BDInfo
      BDInfo\TSPlaylistFile.cs:1047 String.Compare(string, string) is culture-specific
      BDInfo\TSPlaylistFile.cs:1113 String.Compare(string, string) is culture-specific
      BDInfo\TSPlaylistFile.cs:1180 String.Compare(string, string) is culture-specific
    
    Project Emby.Server.Implementations
      Emby.Server.Implementations\Channels\ChannelManager.cs:626 String.IndexOf(string) is culture-specific
      Emby.Server.Implementations\ScheduledTasks\DailyTrigger.cs:47 Specify string culture explicitly
      Emby.Server.Implementations\Sorting\AlphanumComparator.cs:82 String.CompareTo is culture-specific
    
    Project Jellyfin.Server
      Jellyfin.Server\SocketSharp\RequestMono.cs:16 String.IndexOf(string) is culture-specific
      Jellyfin.Server\SocketSharp\RequestMono.cs:618 String.IndexOf(string) is culture-specific
      Jellyfin.Server\SocketSharp\RequestMono.cs:641 String.IndexOf(string) is culture-specific
    
    Project MediaBrowser.Controller
      MediaBrowser.Controller\Sorting\SortExtensions.cs:125 String.CompareTo is culture-specific
    
    Project MediaBrowser.MediaEncoding
      MediaBrowser.MediaEncoding\Encoder\EncodingUtils.cs:48 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:163 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:176 String.IndexOf(string, int) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:186 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:201 String.IndexOf(string, int) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:212 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:232 String.IndexOf(string, int) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:242 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:299 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:305 String.IndexOf(string, int) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:313 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:323 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:338 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:353 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:376 String.IndexOf(string) is culture-specific
      MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:389 String.IndexOf(string) is culture-specific
    
    Project SocketHttpListener
      SocketHttpListener\Ext.cs:255 String.IndexOf(string) is culture-specific
      SocketHttpListener\Ext.cs:263 String.IndexOf(string) is culture-specific

That Ssa parser should probably be replaced with the ffmpeg transcoding.

Originally created by @EraYaN on GitHub (Jan 26, 2019). **Describe the bug** Some string functions might be culture specific, causing issues or unintended behaviour if the culture is not handled properly. In stead of an XML export I tried the text export this time: ``` Solution MediaBrowser.sln Project BDInfo BDInfo\TSPlaylistFile.cs:1047 String.Compare(string, string) is culture-specific BDInfo\TSPlaylistFile.cs:1113 String.Compare(string, string) is culture-specific BDInfo\TSPlaylistFile.cs:1180 String.Compare(string, string) is culture-specific Project Emby.Server.Implementations Emby.Server.Implementations\Channels\ChannelManager.cs:626 String.IndexOf(string) is culture-specific Emby.Server.Implementations\ScheduledTasks\DailyTrigger.cs:47 Specify string culture explicitly Emby.Server.Implementations\Sorting\AlphanumComparator.cs:82 String.CompareTo is culture-specific Project Jellyfin.Server Jellyfin.Server\SocketSharp\RequestMono.cs:16 String.IndexOf(string) is culture-specific Jellyfin.Server\SocketSharp\RequestMono.cs:618 String.IndexOf(string) is culture-specific Jellyfin.Server\SocketSharp\RequestMono.cs:641 String.IndexOf(string) is culture-specific Project MediaBrowser.Controller MediaBrowser.Controller\Sorting\SortExtensions.cs:125 String.CompareTo is culture-specific Project MediaBrowser.MediaEncoding MediaBrowser.MediaEncoding\Encoder\EncodingUtils.cs:48 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:163 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:176 String.IndexOf(string, int) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:186 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:201 String.IndexOf(string, int) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:212 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:232 String.IndexOf(string, int) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:242 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:299 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:305 String.IndexOf(string, int) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:313 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:323 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:338 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:353 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:376 String.IndexOf(string) is culture-specific MediaBrowser.MediaEncoding\Subtitles\SsaParser.cs:389 String.IndexOf(string) is culture-specific Project SocketHttpListener SocketHttpListener\Ext.cs:255 String.IndexOf(string) is culture-specific SocketHttpListener\Ext.cs:263 String.IndexOf(string) is culture-specific ``` That Ssa parser should probably be replaced with the ffmpeg transcoding.
OVERLORD added the bugconfirmed labels 2026-02-06 19:35:44 +03:00
Author
Owner

@stale[bot] commented on GitHub (Jul 30, 2019):

Issues go stale after 60d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 7d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Jul 30, 2019): Issues go stale after 60d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 7d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on [Matrix or Social Media](https://jellyfin.readthedocs.io/en/latest/getting-help/).
Author
Owner

@EraYaN commented on GitHub (Jul 31, 2019):

This still holds.

@EraYaN commented on GitHub (Jul 31, 2019): This still holds.
Author
Owner

@stale[bot] commented on GitHub (Oct 29, 2019):

Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Oct 29, 2019): Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Author
Owner

@BaronGreenback commented on GitHub (Oct 31, 2020):

Still holds.

@BaronGreenback commented on GitHub (Oct 31, 2020): Still holds.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#334