'PHP inserts weird symbols instead of polish letters [duplicate]

When i'm inserting data from mysql database using this code it doesn't fill polish letters instead it shows random weird symbols instead of polish letters Also it seems that it's problem from database site yet i have it on utf8_polish_ci: PHP shows symbols instead of letters

    $con=mysqli_connect("localhost","blank","blank","blank");
    if (mysqli_connect_errno())
    {
        echo "Nie Udało się połączyć z bazą danych: " . mysqli_connect_error();
    }

    $result = mysqli_query($con,"SELECT * FROM Delegacje");

    echo "<table>
<tr>
<th>Imię i Nazwisko</th>
<th>Data od</th>
<th>Data do</th>
<th>Miejsce wyjazdu</th>
<th>Miejsce przyjazdu</th>
</tr>";

    while($row = mysqli_fetch_array($result))
    {
        echo "<tr>";
        echo "<td>" . $row['Imie i Nazwisko'] . "</td>";
        echo "<td>" . $row['Data od'] . "</td>";
        echo "<td>" . $row['Data do'] . "</td>";
        echo "<td>" . $row['Miejsce wyjazdu'] . "</td>";
        echo "<td>" . $row['Miejsce przyjazdu'] . "</td>";
        echo "</tr>";
    }
    echo "</table>";

    mysqli_close($con);






Solution 1:[1]

Try opening file in regular notepad go save as and under encoding chose UTF-8, that could help too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ajdin Hukic