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

Fix Local support for Norwegian Bokmal #549

Open
wants to merge 2 commits into
base: rel/v0.8.9
Choose a base branch
from

Conversation

defaste
Copy link

@defaste defaste commented Jun 3, 2021

Connection to a PostgreSQL database on Windows 7 or newer configured to use Norwegian Bokmal language always fails.
This is a quick-and-dirty solution I should use to make the driver to work.
I'm available to test the official fix when it will be available.

@kdubb
Copy link
Member

kdubb commented Jun 3, 2021

@defaste What is the full localeValue string passed to Locales.parseLocale?

@defaste
Copy link
Author

defaste commented Jun 3, 2021

@defaste What is the full localeValue string passed to Locales.parseLocale?

The full localeValue is "Norwegian Bokmål". The character å is not parsed correctly, i see a square in the log file.
This is a well known issue for Norwegian language, see https://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale

@kdubb
Copy link
Member

kdubb commented Jun 3, 2021

What was changed?

To fix these issues, it was decided to map the problematic "Norwegian (Bokmål)_Norway" locale name to an alias of the same locale that Windows also recognizes, "Norwegian_Norway".

Unfortunately, even though the code was changed to use the "Norwegian_Norway" alias, the old problematic name will still exist in the pg_database system catalog in old installations, and also in the postgresql.conf configuration file. These instances need to be converted manually.

Shouldn't the database be converted as it says? Also, if we were to add this very special case, shouldn't we map it to Norwegian_Norway?

@defaste
Copy link
Author

defaste commented Jun 3, 2021

Unfortunately this is a clean recent installation of PostgreSQL 13.3 on Windows 10, official EDB installer.
I can confirm setting localeValue = "Norwegian_Norway" works perfectly in my application.

@kdubb
Copy link
Member

kdubb commented Aug 14, 2021

@defaste Can you remove the version change... I cannot merge until the local remap is the only change.

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

Successfully merging this pull request may close these issues.

None yet

2 participants