The Movie Database Support

Hi,
I have many problems with accented characters.
When i list the API, all is ok and when I import datas on my php page , accented characters are missing.
However my pages are encoded with utf-8.
What's wrong ?
Thanks for the help
Michel

6 replies (on page 1 of 1)

Jump to last post

@michelweb said:
PHP - accented characters
Hi,
I have many problems with accented characters.
When i list the API, all is ok and when I import datas on my php page , accented characters are missing.
However my pages are encoded with utf-8.
What's wrong ?
Thanks for the help
Michel

Maybe this link will help.
https://stackoverflow.com/questions/17624909/how-to-convert-accented-chars-to-html-in-php
https://dev.to/bdelespierre/convert-accentuated-character-to-their-ascii-equivalent-in-php-3kf1

You didn't understood my question. I wrote "characters are missing". How can you handle a letter that doesn't existing ? For the overviews in french, accentued letters are totally missing (they are not only unaccentued). For the url of the API, i used the parameter "language=fr-FR" mais for example for the word "année", the word displayed by the api is not "annee" but "anne" (the "é" letter disappeared)

@michelweb said:

You didn't understood my question. I wrote "characters are missing". How can you handle a letter that doesn't existing ? For the overviews in french, accentued letters are totally missing (they are not only unaccentued). For the url of the API, i used the parameter "language=fr-FR" mais for example for the word "année", the word displayed by the api is not "annee" but "anne" (the "é" letter disappeared)

When you say in your first text

When i list the API, all is ok and when...

I understand that the data received from our server is correct.
All accented letters are there. Am I right ?

If I'm right then the problem is in PHP.
In this case, it is better to ask someone who knows the language for help.
Our admin Travis Bell always suggests seeking help from:
https://stackoverflow.com/tags/themoviedb-api

The datas are there when i load the api address in my browser. When i recover the datas in my foreach loop accented letters are not there (these letters are absent). As I told you as example for the word 'année' (which mean year), I don't receive année, i don't receive annee but anne (the letter is totally removed)

@michelweb said:
The datas are there when i load the api address in my browser.

So the TMDb server is sending the correct data.

When i recover the datas in my foreach loop accented letters are not there (these letters are absent).
As I told you as example for the word 'année' (which mean year), I don't receive année, i don't receive annee but anne (the letter is totally removed)

That's why I suggested looking for help at https://stackoverflow.com/tags/themoviedb-api
We don't have the expertise to help in all programming languages.

After thinking, it comes from my php loop maybe. A developer suggested me to use of a regular expression. I sent him a message to know. Sorry if it comes from that

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

Global

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

On media pages

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

On TV season pages

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

On TV episode pages

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

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

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

Want to rate or add this item to a list?

Login