0

I've got this piece of code:

      if (self::$username == "Borsucza Łapa.") {
        die("tak");
      } else {
        echo self::$username . "<br />";
        echo "Borsucza Łapa.";
      }

The condition is not valid, and the output from else statement is:

Borsucza Łapa.
Borsucza �apa.

What's that sign and how to turn it to an Ł sign?

Oliver M Grech
  • 3,071
  • 1
  • 21
  • 36
Cholewka
  • 775
  • 1
  • 8
  • 25

1 Answers1

-2

Did you try to utf8_encode()?

echo utf8_encode(self::$username);

Oliver M Grech
  • 3,071
  • 1
  • 21
  • 36
  • `utf8_encode(self::$username)` returns `Borsucza Åapa` – Cholewka Apr 27 '21 at 16:25
  • is your doctype ok? – Oliver M Grech Apr 27 '21 at 16:28
  • 1
    `utf8_encode()` is rarely useful. It's sole purpose is to convert a string in ISO-8859-1 encoding to UTF-8 encoding. Given that there's no evidence of the string being ISO-8859-1, and there's no Ł in that character set, it is not going to be of any help. – miken32 Apr 27 '21 at 16:32