• Resolved gilbert-tordeur

    (@gilbert-tordeur)


    Hello.

    Example : I would like to display

    un élève

    as

    un élève

    instead of

    un élève

    Is there a PHP function I can use in my plugin to do this ?

    Thank you in advance,
    Gilbert

Viewing 9 replies - 1 through 9 (of 9 total)
  • MrDudle

    (@mrdudle)

    Those look the same…

    Thread Starter gilbert-tordeur

    (@gilbert-tordeur)

    OK, this is the problem ! Let’s use a _ character that you should ignore :

    I would like to display

    un &_eacute;l&_egrave;ve

    as

    un &_eacute;l&_egrave;ve

    instead of

    un élève

    Is there a PHP function I can use in my plugin to do this ?

    Thank you in advance,
    Gilbert

    MrDudle

    (@mrdudle)

    I’m still not really understanding the problem. You want to display the code for those symbols instead of the symbols?

    Thread Starter gilbert-tordeur

    (@gilbert-tordeur)

    Right. How should I transform my string to display the string as it is in my database (not depending on any charset) rather than being interpretated by the browser ?

    MrDudle

    (@mrdudle)

    Try entering the string in the visual editor. Should display the way you want.

    Thread Starter gilbert-tordeur

    (@gilbert-tordeur)

    I do not understand. What do you mean by visual editor ? Firefox ?

    vtxyzzy

    (@vtxyzzy)

    Use the htmlspecialchars function:

    $string = "un élève";
    echo "unfiltered: $string";
    echo "filtered:" . htmlspecialchars($string);
    Thread Starter gilbert-tordeur

    (@gilbert-tordeur)

    Hello vtxyzzy.

    Thank you for this information ; I did not know this function.

    Perfect for me. Many thanks.

    Gilbert

    vtxyzzy

    (@vtxyzzy)

    You are welcome! Now, please use the dropdown at top right to mark this topic ‘Resolved’.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to display special caracters code instead of characters ?’ is closed to new replies.