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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:47:36+00:00 2026-05-31T08:47:36+00:00

When I try to read a comma separated values-file containing scandinavian letters into a

  • 0

When I try to read a comma separated values-file containing scandinavian letters into a data frame in r, with the read.table() command, it doesn’t come out right. That is, I want letters such as “å”, “æ”, “ø”, “ä” and “ö” to be included correctly. Right now, they are represented by non-alphabetic signs and they often cause other opperations, such as plotting, to complain.

I’m saving my csv-files in the ordinary text editor in OS X, but I’ve also tried using TextWrangler, saving my file in a specific format, such as UTF-8 and UTF-16 and then specify my encoding within the read.table() command with the "encoding=" option.

What does a minimal example, where scandinavian letters are imported from a csv-file into a data frame, look like?

  • 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-31T08:47:37+00:00Added an answer on May 31, 2026 at 8:47 am

    You need to include more detail regarding your locale and you need to put a sample in a location where people can get it. At the moment my Mac seems to be reading the characters correctly (and I’m not in a locale where it’s even needed):

    > read.table(text='"å", "æ", "ø", "ä"', sep=",")
      V1 V2 V3 V4
    1  å  æ  ø  ä
    > Sys.getlocale()
    [1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
    

    (I also made a file with TextEdit.app and it also reads in properly. And they show up correctly in plotting.) You could try to specify an input encoding with the fileEncoding parameter:

    > read.table(text='"å", "æ", "ø", "ä"', sep=",", fileEncoding="UTF-8")
      V1 V2 V3 V4
    1  å  æ  ø  ä
    

    … which does nothing for me but which might if your locale were set up as “C” which seems to happen for no good reason to some people with Macs. If you only use the ‘encoding’ parameter to read.table, it does nothing at the input stage but only assigns an attribute to the result of the read operation.

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

Sidebar

Related Questions

I try to read file /proc/'pid'/status, using c program. The code is as follows,
Did anyone try to read programmatically an Alibre Design CAD file? I see that
When I try to read bash history into vim, I get nothing. :r !history
fopen is failing when I try to read in a very moderately sized file
I have a very big file 4GB and when I try to read it
In the following code, I try to read data from a plist: -(void)readPreferences {
I have idsfile.csv which is a comma separated file of ids (with no new
Consider the following comma separated file. For simplicity let it contain one line: 'I
How can i avoid duplicate data when inserting from CSV file into my SQL
I want to read words in a text file of a line separated by

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.