title: How to use different unicode in python if the output is in different languages that does not have latin unicode?
body: <p>I'm doing a code for language translator app using tkinter and as an extra feature, I decided to add a function which lets you save the translated text as a pdf file. The problem is, if the translated text contains characters outside of latin unicode, I get errors.</p>
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;C:\Users\vinit\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py&quot;, line 1883, in __call__
      return self.func(*args)
    File &quot;C:/Users/vinit/PycharmProjects/LanguageTranslator/Translator/Translator.py&quot;, line 66, in savepdf
      pdf.output(&quot;Language.pdf&quot;)
    File &quot;C:\Users\vinit\PycharmProjects\LanguageTranslator\venv\lib\site-packages\fpdf\fpdf.py&quot;, line 1065, in output
      self.close()
    File &quot;C:\Users\vinit\PycharmProjects\LanguageTranslator\venv\lib\site-packages\fpdf\fpdf.py&quot;, line 246, in close
      self._enddoc()
    File &quot;C:\Users\vinit\PycharmProjects\LanguageTranslator\venv\lib\site-packages\fpdf\fpdf.py&quot;, line 1636, in _enddoc
      self._putpages()
    File &quot;C:\Users\vinit\PycharmProjects\LanguageTranslator\venv\lib\site-packages\fpdf\fpdf.py&quot;, line 1170, in _putpages
      p = self.pages[n].encode(&quot;latin1&quot;) if PY3K else self.pages[n]
  UnicodeEncodeError: 'latin-1' codec can't encode characters in position 87-91: ordinal not in range(256)
  </code></pre>
  <p>How do I go about so that if I want to translate text from English to Hindi or any other language that has different characters?</p>