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

  • Home
  • SEARCH
  • 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 9271083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:31:50+00:00 2026-06-18T15:31:50+00:00

I am trying to write something in Dutch to a CSV a file and

  • 0

I am trying to write something in Dutch to a CSV a file and this is what happens

In the following program, ideally, “Eéntalige affiche in Halle !!” should be written in the csv file. However, it’s writing “Eéntalige affiche in Halle !!”

# -*- encoding: utf-8 -*-
import csv
S="Eéntalige affiche in Halle !!".encode("utf-8")
file=c = csv.writer(open("Test.csv","wb"))
file.writerow([S])

In the CSV file== ? “Eéntalige affiche in Halle !!”

  • 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-18T15:31:51+00:00Added an answer on June 18, 2026 at 3:31 pm

    You are writing data correctly. The problem lies in whatever is reading the data; it is interpreting the UTF-8 data as Latin 1 instead:

    >>> print('E\xe9ntalige affiche in Halle !!')
    Eéntalige affiche in Halle !!
    >>> 'E\xe9ntalige affiche in Halle !!'.encode('utf8')
    b'E\xc3\xa9ntalige affiche in Halle !!'
    >>> print('E\xe9ntalige affiche in Halle !!'.encode('utf8').decode('latin1'))
    Eéntalige affiche in Halle !!
    

    The U+00E9 codepoint (é, LATIN SMALL LETTER E WITH ACUTE) is encoded to two bytes in UTF-8, C3 and A9 in hex. If you treat those two bytes as Latin1 instead, where each character is always only one byte, you get à and © instead.

    There is no standard for how to treat CSV files and encoding, you’ll need to adjust your encoding to the intended target application to read this information. Microsoft Excel reads CSV files according to the current codepage, for example.

    If your CSV reader is expecting Latin 1, by all means, encode to Latin 1 instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write something like the following to file. keys = {'one','two','three'} values
I'm trying to write something similar to this (sorry if the sample is not
I'm trying to write a code that could print something like this -xv -xvv
I'm trying to write something like this: type 'a 'b xxx = {aaa: 'a:
I'm new to python developing. I'm trying to write something in a file (tmp.addr2line)
I'm trying to write something like: // I don't know how this particular syntax
I am trying to write something to an empty file on my apache server
I am trying to write something like this: Pattern p = Pattern.compile(Mar\\w); Matcher m
I am trying to write something like this: #define COV_ON(x) \ #ifdef COVERAGE_TOOL \
Basically trying to write something like this. Click .button and it .slideToggle(s) it's associated

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.