The Movie Database Support

https://www.themoviedb.org/tv/1398-the-sopranos requires a utf8_decode to correctly process the overview.

https://www.themoviedb.org/tv/1516-the-a-team seems to have some strange uac codes in the json.

The following php works on most (Sopranos included), but nothing I try clears up the overview of 'The A-Team'.

mb_convert_encoding($str, 'UTF-8', "auto");

7 replies (on page 1 of 1)

Jump to last post

"title":"Ã\u2020on Flux"

This isn't properly encoded or UTF8.

Not sure if this page will display properly, but the original is 'Æon Flux'

Hi Edgar,

I can't seem to reproduce this. Here's the cURL output for Aeon Flux:

{
  "adult": false,
  "backdrop_path": "/3c7e0IywQOmPKyVRPwNe2uys0MZ.jpg",
  "belongs_to_collection": null,
  "budget": 62000000,
  "genres": [
    {
      "id": 878,
      "name": "Science Fiction"
    }
  ],
  "homepage": "",
  "id": 8202,
  "imdb_id": "tt0402022",
  "original_title": "Æon Flux",
  "overview": "400 Years in the future, disease has wiped out the majority of the worlds population, except one walled city, Bregna, ruled by a Congress of Scientists. When Æon Flux, the top operative in the underground 'Monican' rebellion, is sent on a mission to kill a Government Leader, she uncoveres a world of secrets.",
  "popularity": 3.23805550330488,
  "poster_path": "/3rKw2QInyaACZ6wnqSg4nAXgKal.jpg",
  "production_companies": [
    {
      "name": "Paramount Pictures",
      "id": 4
    },
    {
      "name": "Lakeshore Entertainment",
      "id": 126
    },
    {
      "name": "Valhalla Motion Pictures",
      "id": 11533
    },
    {
      "name": "MTV Films",
      "id": 746
    },
    {
      "name": "MTV Productions",
      "id": 11534
    },
    {
      "name": "Colossal Pictures",
      "id": 6041
    }
  ],
  "production_countries": [
    {
      "iso_3166_1": "US",
      "name": "United States of America"
    }
  ],
  "release_date": "2005-12-01",
  "revenue": 52000000,
  "runtime": 93,
  "spoken_languages": [
    {
      "iso_639_1": "en",
      "name": "English"
    }
  ],
  "status": "Released",
  "tagline": "The Perfect World Meets The Perfect Assassin",
  "title": "Æon Flux",
  "vote_average": 5.7,
  "vote_count": 139
}

Which has the correct entity.

It looks to me like you're not using a JSON library that is handling the UTF-8 entities properly. Take a look at this Gist for an example of what I just tried.

And if I reference this UTF-8 table, \xc3\x86 is the valid UTF-8 entity for Æ.

Very sorry I'm wrong here. My Java IDE was not set to UTF-8 so it was messing up the received data.

No worries!

Hello, can anybody please tell me an example of a json document request for a particular movie details such as it poster picture and genre and cast? The http://docs.themoviedb.apiary.io/ does not give a very helpful example. I want a JSON returned data which i can use to display details. Thank you

HI Chukwuka,

Would you mind going to the API forum and creating a new thread? That way we can keep conversations straight and in one place. Unfortunately I can't move just a single post into a new thread so this is something you'll need to do.

Hi Travis, I just opened a new thread now. It's called "Help needed for JSON image and data parsing example "

Can't find a movie or TV show? Login to create it.

ყველგან

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

მედიის გვერდზე

b go back (or to parent when applicable)
e go to edit page

ტელევიზიის სეზონების გვერდზე

(right arrow) go to next season
(left arrow) go to previous season

ტელევიზიის ეპიზოდების გვერდზე

(right arrow) go to next episode
(left arrow) go to previous episode

გამოსახულებების გვერდზე

a open add image window

რედაქტირების ყველა გვერდზე

t open translation selector
ctrl+ s submit form

დისკუსიების გვერდზე

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

გსურთ შეაფასოთ ან დაამატოთ ეს ელემენტი სიაში?

ავტორიზაცია