Importing Data: difficulty 3

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A survey file is imported with a parser whose default encoding on your machine is Latin-1 (ISO-8859-1). The delimiter, the header and the row count are all read correctly, but every accented value is altered in the same way. The city that should read Montréal is imported as Montréal, and Québec is imported as Québec. In each case one accented character has been replaced by exactly two characters.

What encoding should be declared when the file is read again? Give the encoding's name in its hyphenated form, as it would be passed to the parser (for example, ISO-8859-1).

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Importing Data Questions: