PHP+ldap results with french accents showing a questionmark

All,

thanks to you I already got the LDAP-queries right, but now there's an issue with the formatting of the results. The queries run perfectly and do return the correct information, however when a name (queried from AD) contains a french accents (and there are quite some of them) the result is shown with a question-mark inside a square instead of the character with the french accent.

I'm wondering, is this due to PHP, javascript or is it maybe the LDAP-query that returns the result with an questionmark?

Your help is appreciated (once again)!

Kind regards,

Michael
LVL 11
MichaelVHAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
Hello MichaelVH,

+1 for LDAP-query

Regards.

0
MichaelVHAuthor Commented:
if you mean that I had to post the query, than here you go:
ldap_search($ctc,"dc=domain,dc=tld","(&(objectcategory=person)(objectclass=user)(cn=*".$_GET['q']."*))") or die ("Error in search query");

regards,

Michael
0
MichaelVHAuthor Commented:
I have found the solutions for my problem.
I had to convert the string (that the query returned) to utf8 using the utf8_encode function.

The other way around utf8_decode did the trick.

Thanks for your help anyway!

Kind regards,

Michael
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.