Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
mataka80
Posts: 10
Joined: Wed Mar 11, 2009 9:04 pm

Problems with special characters

Wed Mar 11, 2009 9:32 pm

Hi

At first thanks for nice api to identify movies.

I have problem with special characters, to me it seems that there is some kind of bug or I miss something.

When i get movie data by using GetIMDBMovieDetails method ä and ö characters are not shown correctly.

E.g. using imdb id 0890882 I get result containing title "Miehen ty&# 195;&# 182;" which converts to "Miehen työ" not to "Miehen työ" what it should be.

When listing subtitles on web site those characters are shown correctly and also for example doing:
http://www.opensubtitles.org/en/search/ ... /simplexml

returns list of subtitle search where those characters are shown correctly and directly as utf8 not as encoded.

By the way if I directly go to imdb and check web page source ö is encoded as &# 246;

Sorry about spaces in character entities I didn't know how to otherwise force forum to show codes instead changing those to actual characters.

User avatar
oss
Site Admin
Posts: 5891
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Thu Mar 12, 2009 2:18 pm

thanks for reporting this problem, I have to look on it. Problem is simple, I use perl module for parsing IMDB pages, then export to XML, import back to PHP and working with that...

I hate those encodings, but if it works good in XML, there will be some other error...

Cougar_
Posts: 19
Joined: Fri May 23, 2008 9:18 pm

Re: Problems with special characters

Fri Mar 13, 2009 2:04 pm

"Miehen työ" not to "Miehen työ"
The two strings are the same, first is encoded with UTF-8 and second is ASCII with codepage used by your language. So, just convert him.

mataka80
Posts: 10
Joined: Wed Mar 11, 2009 9:04 pm

Sat Mar 14, 2009 4:06 pm

The two strings are the same, first is encoded with UTF-8 and second is ASCII with codepage used by your language. So, just convert him.
Even if i could do such a hack and convert those on client side I think it would be nicer to return correct response from server. I mean return response containing plain utf-8 without entity character references or then correct entity reference for those characters. Now it seems like content is handled as non utf-8 (utf-8 character is interpreted like two characters) and those are converted then to character entity references and returned as response.

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 22 guests