Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Decimal = Comma #166

Open
KSanders7070 opened this issue Aug 27, 2024 · 0 comments
Open

[BUG] - Decimal = Comma #166

KSanders7070 opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@KSanders7070
Copy link
Collaborator

There are some nations that use commas in place of periods as decimal points; This results in very strange and sometimes completely invalid GeoJSON outputs.

FEB should force the use of periods for decimal notation, regardless of the user’s locale. This can be done by setting the locale in your program to use a period as the decimal separator.

You can set the culture for the entire application or for specific number formatting tasks using the CultureInfo class from the System.Globalization namespace.

We can set the culture at the beginning of FEB to use the invariant culture, which ensures a period is used as the decimal separator throughout the application.

using System.Globalization;

class Program
{
    static void Main(string[] args)
    {
        // Set the culture to invariant, which uses "." as the decimal separator
        CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
        CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;

        // Your program logic here
    }
}

For now, users can temporarily modify their system to recognize periods as decimals prior to running FEB but is recommended that they reset it back to commas after using FEB.

  1. Open Control Panel:
  • Press Windows + R to open the Run dialog box.
  • Type control and press Enter.
  1. Go to Region Settings:
  • In the Control Panel, select Clock and Region.
  • Click on Region or Change date, time, or number formats.
  1. Customize Format:
  • In the Region window, under the Formats tab, click on Additional settings….
  1. Change Decimal Symbol:
  • In the Customize Format window, find the Decimal symbol field.
    Change it from a comma (,) to a period (.).
  1. Apply Changes:
  • Click Apply and then OK to save the changes.
  1. Restart the Application:
  • Ensure that the changes take effect by restarting any application that may be affected.
@KSanders7070 KSanders7070 added the bug Something isn't working label Aug 27, 2024
@KSanders7070 KSanders7070 changed the title [BUG] - [BUG] - Decimal = Comma Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants