tlocke / pg8000

A Pure-Python PostgreSQL Driver
BSD 3-Clause "New" or "Revised" License
515 stars 46 forks source link

Set a default `CURRENCY` #131

Closed kurtmckee closed 1 year ago

kurtmckee commented 1 year ago

This fixes a NameError that occurs on platforms that don't have any of the listed locale values present. (For example, LANG=en_US.UTF-8 results in a NameError.)

Fixes #130

tlocke commented 1 year ago

Thanks for this, I've gone with the idea of getting the currency symbol using the Python locale package, and having the default of '$' when the locale is 'C'.

kurtmckee commented 1 year ago

Awesome, thanks!