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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:39:22+00:00 2026-05-20T15:39:22+00:00

I have a rather strange problem. I have a very simple application that reads

  • 0

I have a rather strange problem. I have a very simple application that reads some data from a csv formatted file, and draws a polar ‘butterfly’ to a form. However a few people in european countries get a very wierd looking curve instead, and when I modified the program to output some sample values to try and workout what is going on, it only gave me more questions!

Here is a sample of expected values, and what one particular user gets instead:

EXPECTED -> SEEN   
0.00 0.00  -> 0,00 0,00  
5.00 1.35  -> 5,00 1346431626488,41  
10.00 2.69 -> 10,00 2690532522738,65  

So all the values on the right (which are computed in my program) are multiplied by a factor of 10^12!! How on earth can that happen in the CLR? the first numbers – 0, 5, 10 – are just produced by the simple loop that writes the output, using: value += 5.

The code producing these computations does make use of interpolation using the alglib.net library, but the problem does also occur with 2 other values that are extracted from xml returned from a http get, and then converted from radians to degrees.

Also not exactly a problem, but why would decimal values print with commas instead of decimal points? The output code is a simple string.Format("{0:F}", value) where value is a double?

So why on earth would some values be shifted by 12 decimal places, but not others, and only in some countries? Yes others have run the app with no problems… Not sure if there is any relevance but this output came from Netherlands.

  • 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-20T15:39:23+00:00Added an answer on May 20, 2026 at 3:39 pm

    Different cultures use different thousands and decimal separators. en-US (US English) uses “,” and “.” but de-DE (German German) uses “.” and “,”. This means that when reading from or writing to strings you need to use the proper culture. When persisting information for later retrieval that generally means CultureInfo.InvariantCulture. When displaying information to the user that generally means CultureInfo.CurrentCulture.

    You haven’t provided the code that reads from the CSV file, but I imagine you’re doing something like double.Parse(field) for each field. If the field has the value “5.0” and you parse it when the current culture is de-DE “.” will be considered a thousands separator and the value gets read as 50.0 in en-US terms. What you should be doing is double.Parse(field, CultureInfo.InvariantCulture).

    All of the Parse, TryParse, Format, and many ToString methods accept an IFormatProvider. Get in the habit of always providing the appropriate format provider and you wont get bitten by internationalization issues.

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

Sidebar

Related Questions

I've experienced rather strange behavior of JSTL forEach tag. I have some bean called
I found the following rather strange. Then again, I have mostly used closures in
I have rather large input XML files that must be converted to a given
I have a rather large file (150 million lines of 10 chars). I need
We have a rather simple site (minimal JS) with plain html and CSS. It
I have a rather big number of source files that I need parse and
I'm having a rather strange problem with zsh. When I start up my shell,
I am investigating a strange problem with my application, where the behaviour is different
I have a web service written in C#. It behaves rather strange during pool
I have a script that appends some rows to a table. One of the

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.