Suport de The Movie Database

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 resposta (a les pàgines 1 de 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 "

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d’edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió