Soporte 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 respuestas (en la página 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 encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión