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

numfmt: won't do grouping in Windows OS #4302

Open
Gavin-Holt opened this issue Jan 25, 2023 · 3 comments
Open

numfmt: won't do grouping in Windows OS #4302

Gavin-Holt opened this issue Jan 25, 2023 · 3 comments

Comments

@Gavin-Holt
Copy link

Hi,

Many thanks for these utilities - especial thanks for the Windows binaries.

I am trying to format numbers as currency in the UK. e.g. £12,000.99

The UK pound character is a problem - so I am happy with $.

From my batch file:

cat.exe data.csv | numfmt.exe -d, --header --field=2-4 --format="$%%'.2f" >> output.txt

I think that numfmt.exe is getting the ' to trigger grouping, but it does not seem to read my locale from the operating system.

Is there a way to force a locale or an environment variable I can set somehow?

For completeness, this is how I get the UK pound sign to display in Notepad.exe:

sed.exe -i s/\$/\xA3/g output.txt

Any help welcome.

Kind Regards Gavin Holt

@cakebaker
Copy link
Contributor

Grouping has not been implemented yet.

@tertsdiepraam
Copy link
Member

Yep, this might also be related: #1280.

Grouping is a bit tricky to implement because it is locale-dependent.

@Gavin-Holt
Copy link
Author

Leaving this open for others to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants