6

I'm using Python 3.x on windows.

Should I use the # -*- coding: utf-8 -*- declaration on my files? I have read many topics and I think the answer is no but i'm not sure.

Btw i'm writing only in english and italian. Maybe you have to know something else but i don't know what... so ask me

Thank you

fabio
  • 1,210
  • 2
  • 26
  • 55

1 Answers1

9

PEP 3120 defines UTF-8 as the default source encoding for Python 3.x. If you save the file as that encoding (or as ASCII, of course) then no encoding declaration is required.

The What's New In Python 3.0 document declares its implementation.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358