coding in template

26 views
Skip to first unread message

Dariusz Mysior

unread,
Nov 7, 2015, 3:44:25 PM11/7/15
to Django users
I try use polish letters in my template index.html but I had an error


utf-8' codec can't decode byte 0xb3 in position 149: invalid start byte

How can I fix it?

Gergely Polonkai

unread,
Nov 7, 2015, 3:50:57 PM11/7/15
to Django users
Hello,

I guess seems that your template is saved in LATIN2 encoding (in which 0xb3 is ł). Save it in UTF-8, or set up Django to use LATIN2 as the encoding instead of Unicode (I suggest to go with the first option, though).

Best,
Gergely

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bce1852e-9f2e-482d-9037-5fac55afa487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dariusz Mysior

unread,
Nov 7, 2015, 3:56:04 PM11/7/15
to Django users
How can I save in other coding, I had only option "save as" and name of file index.html

Gergely Polonkai

unread,
Nov 7, 2015, 4:42:35 PM11/7/15
to Django users
That depends on your text editor. Most of them make it possible to choose an encoding in the save dialog.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Dariusz Mysior

unread,
Nov 9, 2015, 1:29:34 PM11/9/15
to Django users
Thank's i set it in PyCharm on encoding utf-8 like You said and it's work!


W dniu sobota, 7 listopada 2015 21:44:25 UTC+1 użytkownik Dariusz Mysior napisał:
Reply all
Reply to author
Forward
0 new messages