Jellyfin Forum
Subtitles Problem - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Subtitles Problem (/t-subtitles-problem)



Subtitles Problem - adymaster - 2023-06-30

I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

Haw I can Solve that?

Thanks


RE: Subtitles Problem - skribe - 2023-06-30

(2023-06-30, 04:26 PM)adymaster Wrote: I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

Haw I can Solve that?

Thanks

This is often indicative of fonts that are missing the requisite characters. If it's transcoding, this might be solved by ensuring that the required fonts are available on the server machine, and if it's direct play, they may need to be installed on the client device.


RE: Subtitles Problem - adymaster - 2023-07-01

skribe dateline='[url=tel:1688160185' Wrote: 1688160185[/url]']
adymaster dateline='[url=tel:1688142374' Wrote: 1688142374[/url]']
I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

Haw I can Solve that?

Thanks

This is often indicative of fonts that are missing the requisite characters. If it's transcoding, this might be solved by ensuring that the required fonts are available on the server machine, and if it's direct play, they may need to be installed on the client device.


Thanks,
I run server on my Laptop, Intel® Core™ i5-2430M, 2.40GHz, 8GB, 500GB, nVidia GeForce GT 540M 2GB
Is not so performant, I watch on a LG C2.
Can you tell me please what is the best solution step by step.
I can t find haw to solve withe subtitle.
Thanks


RE: Subtitles Problem - skribe - 2023-07-02

I'm afraid that I have very little personal experience with subtitles. I would imagine that there isn't a way to add fonts to a TV app client. You may need, instead, to install them on the server device and force subtitle burn-in. The burn-in setting is a user setting in the client I believe, and the relevant server setting is the "fallback fonts" section under the playback section of your dashboard.

Just make sure to install a font that has complete support for all of the special characters utilized by whatever language you're trying to play.


RE: Subtitles Problem - Yababakets - 2024-08-17

(2023-06-30, 04:26 PM)adymaster Wrote: I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

Haw I can Solve that?

Thanks

Hi, based on the previous posts, the issue you're encountering with the question mark (?) replacing diacritics (Ăă, Ââ, Îî, Șș, Țț) isn't related to fonts, clients, or similar factors. The problem arises because the subtitle's character encoding is set to Central European ISO-8859-2 (which covers Albanian , Bosnian , Croatian , Czech , Finnish , German , Hungarian , Polish , Romanian , Rotokas , Serbian , Slovak , Slovene ,Upper Sorbian , Lower Sorbian , Turkmen ) , whereas Jellyfin prefers Unicode UTF-8.


To resolve this, you can try the following methods:

  1. Use Gaupol (a subtitle editor):
    • Install Gaupol on your system. You can download the Windows version from here.
    • Open the subtitle file using the Central European (ISO-8859-2) character encoding.
    • Save the file with the Unicode ( UTF-8 ) character encoding.
  2. Use an online converter:
    • Visit an online encoding converter like FreeFormatter.
    • Upload your subtitle file and convert it from ISO-8859-2 to UTF-8.
    • Download the converted file. Note that this method might not successfully convert all characters.

If you have a large number of subtitles, converting them individually could take a significant amount of time. Instead, you can create a Python script to automate the process. Here's how:
  •  Open a text file and add the following code:
Code:
import os
import codecs

# Function to check if a file is UTF-8 encoded
def is_utf8(file_path):
    try:
        with open(file_path, 'r', encoding='UTF-8') as f:
            f.read()
        return True
    except UnicodeDecodeError:
        return False

# Function to convert ISO-8859-2 to UTF-8
def convert_encoding(file_path):
    with codecs.open(file_path, 'r', encoding='ISO-8859-2') as f:
        content = f.read()
    with codecs.open(file_path, 'w', encoding='UTF-8') as f:
        f.write(content)

# Function to process directory
def process_directory(directory):
    for root, dirs, files in os.walk(directory):
        for file in files:
            if file.endswith(('.sub', '.srt')):
                file_path = os.path.join(root, file)
                if not is_utf8(file_path):
                    convert_encoding(file_path)
                    print(f"Converted: {file_path}")
                else:
                    print(f"Skipping: {file_path} (already UTF-8)")

# Main function
def main():
    directory = r"C:\your\path"  # Replace with the path to your folder containing the subtitles
    process_directory(directory)

if __name__ == "__main__":
    main()
 
  • Save the file as iso2utf.py
  • Replace "C:\your\path" with your path
  • Ensure you have the latest version of Python installed to run the script.

You can run the script in Command Prompt (Windows) or Terminal (macOS/Linux). Alternatively, you can open it in Visual Studio Code and run it from there.

This script will automate the process of checking and converting subtitle files (formats .sub and .srt) from ISO-8859-2 to UTF-8 encoding.