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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:29:47+00:00 2026-05-20T00:29:47+00:00

I have an input which is in UTF16LE encoding. By the time this input

  • 0

I have an input which is in UTF16LE encoding. By the time this input reaches my code its been through a FileInputStream encased in a FileReader encased in a LineNumberReader.

The first line read gives a string like:

"1 piece of data like a string"

However, looking into this String the value will be something along the lines of:

[, 1, p, i, ...]

Notice the empty element to start.

No this string is passed through a couple of functions here and there, converted to Object and basically is being put through its paces. At a certain point, what should only be the first part of the String (the 1 or in my case any number including with decimals) is passed to a function which has to parse it to an actual Number.

The content of this String appears to be "1" but in the value it says:

[, 1, p, i, ...]

so the whole string is still in there.

In any case it returns a ParseException and I print the unparseable number to an exception messages and my logging tels me that “1” is an unparseable number.

The real problem appears to be the leading empty element as subsequent lines show similar behavior except for the leading empty element and they parse.

  • 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-20T00:29:47+00:00Added an answer on May 20, 2026 at 12:29 am

    I think I have the answer. The encoding was not UTF16LE. It was set to UTF16LE by an auto char detection algorithm. The encoding is utf16 with a BOM. However since the various classes thought the encoding was UTF16LE they were not getting rid of the BOM which shouldn’t be there in the LE version.

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

Sidebar

Related Questions

I have an input which is of this form: (((lady-in-water . 1.25) (snake .
I have a UILabel which I change through the code. However when I create
I have an input which at some points happens to have the focus. If
I have an input file that I want to sort based on timestamp which
I have a cgi script which takes form input, I want to facilitate the
I have the following C# which simply replaces parts of the input string that
We have an Access DB which has a set of local tables and input
I have xml input which looks like (simplified version used for example): <Student> <Subject>
I have an input field which when the enter key is pressed (as there
I have a streaming input which has repeated values. I can use any data

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.