Skip to content

Conversation

ikalnytskyi
Copy link
Owner

@ikalnytskyi ikalnytskyi commented Jul 2, 2022

If not explicitly specified, PostgreSQL infers both locale and encoding
from the locale settings upon database initialization. Speaking about
GitHub runners, they all have different locale settings. For instance,
Windows runner uses CP1252 encoding which renders the database unable
to deal with non-latin characters.

This patch enforces encoding="UTF-8" and locale="en_US.UTF-8" on all
supported platforms in order to ensure that the database behaves the
same way in certain edge cases.

@ikalnytskyi ikalnytskyi force-pushed the encoding branch 18 times, most recently from e208aa7 to 51c9bac Compare July 2, 2022 14:39
If not explicitly specified, PostgreSQL infers both locale and encoding
from the locale settings upon database initialization. Speaking about
GitHub runners, they all have different locale settings. For instance,
Windows runner uses `CP1252` encoding which renders the database unable
to deal with non-latin characters.

This patch enforces encoding="UTF-8" and locale="en_US.UTF-8" on all
supported platforms in order to ensure that the database behaves the
same way in certain edge cases.

Fixes #3
@ikalnytskyi ikalnytskyi changed the title Add tests to ensure UTF-8 encoding of the database Use encoding="UTF-8" and locale="en_US.UTF-8" Jul 2, 2022
@ikalnytskyi ikalnytskyi merged commit e5b7793 into master Jul 2, 2022
@ikalnytskyi ikalnytskyi deleted the encoding branch July 2, 2022 15:17
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.

1 participant