Problem with polish national fonts

  • Hi,


    I'm writing plugin which will communicate with http server.


    When I receive answer with polish national fonts which i want to display on shell it raise the error.


    Bellow I gave the server response examples which makes trouble:


    Zitat


    {"error":"Hasło jest za krótkie (przynajmniej 5 znaków)"}
    or
    {"error":"Has\u0142o jest za kr\u00f3tkie (przynajmniej 5 znak\u00f3w)"}


    Whet I simple use:

    Code
    print  '{"error":"Hasło jest za krótkie (przynajmniej 5 znaków)"}'


    it displays me communicate which is not acceptable (no polish fonts):

    Zitat

    {"error":"HasĹo jest za krĂłtkie (przynajmniej 5 znakĂłw)"}

    and in case that I point that it's unicode

    Code
    print  u'{"error":"Hasło jest za krótkie (przynajmniej 5 znaków)"}'


    the error is raisen:

    Zitat

    UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 13: ordinal not in range(128 )

    "Reasonable people adapt themselves to the world.
    Unreasonable people attempt to adapt the world to themselves.
    All progress, therefore, depends on unreasonable people"


    ============
    SubsDownloader

  • I checked it and I have this setup.



    Ale I checked polish fonts in python console and it also gives me same error



    Zitat

    >>> print u'\u0142'
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 0: ordinal not in range(128)
    >>>


    Do You have any other idea? The case is that I'm afraid that in GUI the polish fonts will also make problem.

    "Reasonable people adapt themselves to the world.
    Unreasonable people attempt to adapt the world to themselves.
    All progress, therefore, depends on unreasonable people"


    ============
    SubsDownloader