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 6189013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:20:08+00:00 2026-05-24T02:20:08+00:00

A file in UTF-8 encoding has an è character (e with accent grave) embedded

  • 0

A file in UTF-8 encoding has an è character (e with accent grave) embedded in comment delimiters for Python. Django complains about this character and will not render the page. How can I resolve this?

  • 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-05-24T02:20:08+00:00Added an answer on May 24, 2026 at 2:20 am

    The SyntaxError Django is raising already points you in the right direction.

    It is always a good thing to actually read exceptions. In your case, it will have said something along the lines of

    Non-ASCII character ‘\xc3’ in file /home/zakx/../views.py on line 84, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details (views.py, line 84)

    If you’d then read PEP-0263, you could learn that there are some ways to tell Python (and your editor!) which encoding your files are in. Generally, you will want to use UTF-8 encoding whenever possible. Therefore, writing one of the following lines into the first line (or second, if you use a shebang) will tell Python to use UTF-8 for that file.

    # coding=utf8
    # -*- coding: utf8 -*-
    # vim: set fileencoding=utf8 :
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file UTF-8 encoding in windows, and when i use it under
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1
I created an App.config file in my WPF application: <?xml version="1.0" encoding="utf-8" ?> <configuration>
I'm processing a UTF-8 file in Python, and have used simplejson to load it
I'm trying to load a simple Xml file (encoded in UTF-8): <?xml version=1.0 encoding=UTF-8?>
I have to read a text file which is Unicode with UTF-8 encoding and
I have a Python extension to the Nautilus file browser (AFAIK this runs exclusively
I have a Unicode file (UTF-16 FFFE little-endian BOM) which contains rows of tab-separated
I have a file in UTF-8, where some lines contain the U+2028 Line Separator
I am having utf-8 encoded file containing arabic text and I have to search

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.