Assistance de TMDB

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 réponses (sur la page 1 sur 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 "

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenêtre ouverte
? Ouvrir la fenêtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenêtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r Répondre à la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion