When I use this code to insert data from mysql database it does not populate with polish letters but shows random weird symbols instead of polish letters Also this seems to be a problem with the database site but I am on utf8_polish_ci There it is: PHP displays 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);
Try opening the file in regular notepad and save as and selecting UTF-8 under encoding, that will also help.