Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8964897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:41:29+00:00 2026-06-15T16:41:29+00:00

Some source files, from downloaded code, have the following header # -*- coding: utf-8

  • 0

Some source files, from downloaded code, have the following header

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

I have an idea what utf-8 encoding is but why would it be needed as a header in a python source file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:41:30+00:00Added an answer on June 15, 2026 at 4:41 pm

    wherever you need to use in your code chars that aren’t from ascii, like:

    ă 
    

    interpreter will complain that he doesn’t understand that char.

    Usually this happens when you define constants.

    Example:
    Add into x.py

    print 'ă'
    

    then start a python console

    import x
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "x.py", line 1
     SyntaxError: Non-ASCII character '\xc4' in file x.py on line 1, 
       but no encoding declared;
       see http://www.python.org/peps/pep-0263.html for details
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded source code for some software from svn on Linux and want
I have downloaded some Office files(doc, xls, pdf etc) on SDcard from FTP server
I have downloaded code from google codes but when I import that project in
I'm building C++ app with CMake. But it uses some source files in C.
I have to build some C source files using Visual Studio (currently using VS2008)
I have some source code to get the file name of an url for
I have written some code that makes use of an open source library to
I downloaded the source code for an applet from here: http://www.oxygenxml.com/demo/AuthorDemoApplet/author-component-dita.html As instructed, I've
I'm trying to build System.Data.SQLite in Visual Studio using the source code downloaded from
I downloaded Java source code of some project that works with Maven. After checking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.