Re: I install v1.5 Django, and run a my first site, then have an error: 'utf-8' codec can't decode byte 0xbc in position 0: invalid start byte. I use Sublime editor.

55 views
Skip to first unread message

Julien Phalip

unread,
Nov 25, 2012, 11:23:21 AM11/25/12
to django...@googlegroups.com
Hi,

Can you please post the entire traceback?

Thanks!

Julien

On Sunday, November 25, 2012 4:03:11 PM UTC+1, 名宏贾 wrote:
 I don't know why, editer have default utf-8 setting.

Sergiy Khohlov

unread,
Nov 25, 2012, 4:10:36 PM11/25/12
to django...@googlegroups.com
check databse setting. look like your database uses non utf8 encoding

2012/11/25 Julien Phalip <jph...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/IO1GwuMHLXQJ.
>
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

Duda Nogueira

unread,
Nov 26, 2012, 8:41:34 AM11/26/12
to django...@googlegroups.com
If you use different characters on your code (comments, strings, etc), such as é, í, ç or, on your case, you sign the code with your name, 名宏贾, you need to add:

# -*- coding: utf-8 -*-

on the beginning of the file.

This is a guess about what is happening with your code. 
Pasting the entire traceback here will give us a better clue.

For mor info about this:


Thanks!

Duda Nogueira
Gerente de Projetos em Tecnologia
www.dudanogueira.com.br

Celular: +55 31 9985-1271
Reply all
Reply to author
Forward
0 new messages