I’m getting the following error: The setup is a newly installed and updated Fedora 34 system with Python 3.9.6. The error occurs when running Lutris, and also when typing the commands into IDLE. Here is the exact backtrace from Lutris: Given that, according to the Python docs, “An empty string specifies the user’s default settings,” I figured maybe my default
Tag: locale
What is the difference between C.UTF-8 and en_US.UTF-8 locales?
I’m migrating a Python application from an Ubuntu server with a en_US.UTF-8 locale to a new Debian server which comes with C.UTF-8 already set by default. I’m trying to understand if there could be any impact from this change. Answer In general C is for computer, en_US is for people in US who speak English (and other people who want
display pandas dataframe with european formatting
I found answers on the question on how to load csv files with european formatting into pandas dataframes and display them in the US format (2,345.21). However how can I display floats saved in the US format in the european format (2.345,21) in pandas. I tried to just change dot and commas here: from to but this doesn’t work. Another
How to sort collections based on current user locale on a Django site
I need to sort a collection of objects by a utf-8 string property (built via ActiveRecord). Currently the code is sorting by ASCII order via the order_by method, however this needs to be changed to locale.strcoll. Unfortunately using the built in locale functionality requires changing the culture for the entire application, not just the current request. I’ve looked at the