I have an e-commerce website which is in polish and the product categories are stored in the database (in polish)
For some reason the special foreign characters are not displaying but only in certain parts of the website.
characters like ł, ą, ó and many more.
the thing is they display perfectly in the main body of the category page but they are also displayed down the left hand side of the page as an alternative navigation and it is this left side nav which they are not displaying correctly...they are showing up as ? or �
I have checked the table in the database and it is stored as utf8_general_ci
I have checked the "left-nav.php" file which is included in the page and it is encoded in UTF8.
I even checked the category page file even though it displays the characters correctly in the main body, and it is also saved in UTF8.
I have this line of code in my site header
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
I use HeidiSQL to manage my database and they are stored correctly in the database
am I missing something? and what can I do to fix this?
Why would special characters like these display correctly in some places but not others?
Here is the code for the top category in the left navigation
<?php
$sql = mysqli_query($con, "SELECT * FROM RAE_categories_pl WHERE categoryID = '".$category."'");
$result = mysqli_fetch_array($sql);?>
<div class="liSelect"><img src="images/arrowdown_off.gif" style="padding:0px; margin:0px -10px 0 0;float:right;"><a class="select" href="<?php echo "http://" . $_SERVER['HTTP_HOST']?>/products/<?php echo $result['categoryID'];?>"><?php echo $result['categoryName'];?></a></div>
<?php
$sql2 = mysqli_query($con, "SELECT RAE_sub_categories_pl.categoryName AS subCatName, RAE_sub_categories_pl.categoryID AS subCatID FROM RAE_sub_categories_pl INNER JOIN RAE_products_pl ON RAE_products_pl.subCategory = RAE_sub_categories_pl.categoryID AND RAE_products_pl.active = 1 WHERE RAE_sub_categories_pl.parentCatID = '$category' GROUP BY RAE_sub_categories_pl.categoryID");
while ($result2 = mysqli_fetch_array($sql2))
{?>
<div class="liul">
<div class="ulli">
<a href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . "/equipment/" . $category . "/" . $result2['subCatID'];?>"><?php echo $result2['subCatName']?></a>
</div>
</div>