Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

(unicode error) 'utf-8' codec can't decode byte 0xf3

I’m using django 5.0.8 and python 3.11, so in my view i use this:

context = RequestContext(request,
                {
                    'title':'sómething',
                    'formLogin': formLogin
                })

As you can see i pass string with ‘ó’ value, when i try to run my project gives me the error ‘(unicode error) ‘utf-8′ codec can’t decode byte 0xf3’ this happen with any special characters for what i know using ‘# –– coding: utf-8 –-‘ at first in my view solve this, but not now, what can i do?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need to save your file enconded with UTF-8 codec.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading