I have an if statement checking if a certain tag is found within an array. The if statement works perfectly for the English side of our website but when working with French it seems to have an issue.
I realised it was only missfiring for the tags that included letters with accents! Here is an example:
{% set myTopics = ['Employés', 'Gestion', "Culture", 'Stratégie', 'Produit'] %}
{% set theTag = "Stratégie" %}
{% if theTag in myTopics %}
//do a thing...
{% endif %}
When theTag = “Culture”, “Produit” or “Gestion” the operation works as intended, when its = “Employés” or “Stratégie” the operation fails even though the variable is clearly within the array.
Is this normal? Is there some sort of filter I could use to ignore the accents?
Our blog & website is bilingual so I really need to find a solution to this issue!