oustish

New Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by oustish

  1. Hey.

     

    I have run into a small problem today when trying to list files in certain folder using get_files API method.

    Thing is that I get in return something like this (raw data displayed by the browser):

    { "name": "Analogowe uk\u00c5\u0082ady elektroniczne (L)", "state": "created", "type": "folder" }
    { "download": 0, "have_pieces": 0, "name": "rozk\u00c5\u0082ad_roku.pdf", "size": 373406, "state": "created", "total_pieces": 12, "type": "file" } 

    You can see there is part of (what it seems) badly encoded character (in this case one particular: ł or l with stroke). When tried to decode JSON using PHP json_decode() function it gave in return Å + one more not-printable character instread of what it should have.

    It is not limited to this single character. Other entries I've tried also produces similar bug.

     

    From what I could find in web (it is about another program, but the bug is the same - just in case it might be exactly the same problem): 

    It looks like whatever process generated that JSON took UTF-8-encoded text and mistook it for Latin-1-encoded text.

     

    Any help would be appreciated.

    BitTorrent Sync version: 1.2.82 running on FreeBSD x64.