Skip to content
Advertisement

� character from ldap

i am getting some strange characters form ldap server when i search some user info.if value contains turkish characters like ‘ç’ it replaces to ‘�’.in this situatian i convert string to utf-8 than str_replace to fix it.My function is that;

JavaScript

But sometimes that causes some problem , so i have to detect if string contains ‘�’ character to fix it.strpos does not work.Can anyone say something about this? And what is this shit ‘�’ character , i would be happy if anyone can explain…

Edit: Here is my code snippet;

JavaScript

and output of this code;

JavaScript

Advertisement

Answer

It has been a long time but i decided to share my solution who faced with the same problem.

This function worked for me:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement