Answer the question
In order to leave comments, you need to log in
Why does the Flask server throw an error when using Cyrillic in a dictionary?
When you try to access the dictionary (TOPIC_DICT) by the key in Russian ("Key"), the server gives an error (Internal Server Error). And everything works in English. UTF-8 is set everywhere in the code. Notepad++ also uses UTF-8. Russian text in normal HTML code is displayed without errors.
{% for t in TOPIC_DICT["Ключ"] %}
<li><a href="{{t[1]}}">{{t[0]}}</a></li>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question