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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:01:34+00:00 2026-06-13T23:01:34+00:00

My computer has no idea what this character is. It came from Excel. In

  • 0

My computer has no idea what this character is. It came from Excel.

In excel it was a weird space, now it is literally represented by several symbols viz. my computer has no idea what it is.

This character is represented by a Ê in Excel (in csv, as xls it is a space of some kind), OS X’s TextEdit treats it as a big space this long ”            “, which is, I think, what it is. Ruby’s CSV parser blows up when it tries to parse it using normal utf-8, and I have to add :encoding => "windows-1251:utf-8" to parse it, in which case Ruby turns it into an “K”. This K appears in groups of 9, 12, 15 and 18 (KKKKKKKKK, etc) in my CSV, and cannot be removed via gsub(/K/) (groups of K, /KKKKKKKKK/, etc, cannot be removed either)! I’ve also used the opensource tool CSVfix, but its “removing leading and trailing spaces” command did not have an effect on the Ks.

I’ve tried using sed as suggested in Remove non-ascii characters from csv, but got errors like

sed: 1: “output.csv”: invalid command code o

when running something like sed -i 's/[\d128-\d255]//' input.csv on Mac.

  • 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-13T23:01:35+00:00Added an answer on June 13, 2026 at 11:01 pm

    The answer to this problem is

    A.) this is a very difficult problem. no one so far knows how to “physically” remove the cyrillic Ks.

    but

    B.) csv files are just strings separated by unescaped commas, so matching strings using regular expressions works just find so long as the encoding doesn’t break the program.

    So to read the file

    f = File.open(File.join(Rails.root, 'lib', 'assets', 'repo', name), :encoding => "windows-1251:utf-8")
    parsed = CSV.parse(f)
    

    then find specific rows via regular expression literal string matching (it will overlook the cyrillic K’s)

    parsed.each do |p|           #here, p[0] is the metatag column
      @specific_metatag_row = parsed.index if p[0] =~ /MetatagA/
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone successfully done this? My idea is to post to a servlet and
I'm sorry if this question has been asked before, but the idea is hard
For the reasons of electricity my computer has shut down. That time my Netbeans
How can I code to see how long the computer has been on. Simple
How do I specify the following requirement in my html? When the computer has
My development target is a Linux computer that has two physical serial ports located
i'm programming a simple OpenGL program on a multi-core computer that has a GPU.
If a user has signed into their computer and are connected to an intranet,
Programming has come a long way. I am still relatively young (first Computer: C64),
I am a computer science student currently doing an internship. My boss has asked

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.