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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:01:02+00:00 2026-06-04T23:01:02+00:00

I ran a few javascript files thru my spaces2tabs converter (ps I was porting

  • 0

I ran a few javascript files thru my spaces2tabs converter (ps I was porting to coffeescript which is why I needed tabs – have since abandoned coffeescript)


    public static String convertSpacesToTabs(String str, int spacesPerTab) {
        assert (spacesPerTab >= 1);
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i = 0) {
            //System.out.println("old: " + oldIdx + " new: " + newIdx);
            sb.append(str.substring(oldIdx, newIdx));
            sb.append('\t');
            oldIdx = newIdx + toFind.length();
            newIdx = str.indexOf(toFind, oldIdx);
        }
        sb.append(str.substring(oldIdx, str.length()));
        return sb.toString();
    }

Worked like a charm: replaced spaces with tabs. Looks perfect in TextMate, runs fine, etc etc. Perfectly valid UTF-8

The ONLY issue comes up in eclipse, where it is a mess.

It seems like eclipse cannot deal with the \t’s I inserted. When initially opening the files, eclipse shows a strange character and flags these tabs with the message “Invalid Character” delete this token. When I go to the project properties under Resource I changed text version to utf-8 and the strange characters go away, but the error message doesn’t!

Is there an easy way to make eclipse happy?

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

    Seems like a bug in eclipse… no fix as far as I’m aware…

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

Sidebar

Related Questions

I have ran across a few queries that use this where condition: select ...
I am coding a text based Java game, I have ran into a few
We have few components like libraries dlls When initially created I ran the following
I have been using fullcalendar plugin successfully for a few months and suddenly ran
I ran a few queries w/ the persistent option turned on. I now have
I'm using fragment caches pretty extensively and have ran into a few gotchas where
I ran into this issue quite a few times. Let's say I have a
I have two Google App Engine Models. I ran my cron's a few times
I have ran into this problem a few times and I am wondering what
I ran the convert_to_south command on my app. Everything seems to have gone fine:

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.