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

Resolves: tdf#125284 config entries not substituted under Turkish locale #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

caolanm
Copy link

@caolanm caolanm commented Aug 23, 2019

https://bugs.documentfoundation.org/show_bug.cgi?id=125284

This leads to the inability of LibreOffice to create embedded firebird
databases under a Turkish locale.

strcasecmp is used with LC_CTYPE honoured, and...

"These functions shall behave as if the strings had been converted to
lowercase and then a byte comparison performed".

Turkish has the infamous problem that the lowercase of I is the
dotless ı not i.

so strcasecmp("i", "I") != 0 means dir_FOO doesn't caseless match DIR_FOO

firebird/databases.conf contains $(dir_sampleDb) and the string it's compared
to is DIR_SAMPLEDB so a simple fix is to changed DIR_SAMPLEDB to dir_sampledb
and the defalt config will then substitute fine.

https://bugs.documentfoundation.org/show_bug.cgi?id=125284

This leads to the inability of LibreOffice to create embedded firebird
databases under a Turkish locale.

strcasecmp is used with LC_CTYPE honoured, and...

"These functions shall behave as if the strings had been converted to
lowercase and then a byte comparison performed".

Turkish has the infamous problem that the lowercase of I is the
dotless ı not i.

so strcasecmp("i", "I") != 0 means dir_FOO doesn't caseless match DIR_FOO

firebird/databases.conf contains $(dir_sampleDb) and the string it's compared
to is DIR_SAMPLEDB so a simple fix is to changed DIR_SAMPLEDB to dir_sampledb
and the defalt config will then substitute fine.
@AlexPeshkoff AlexPeshkoff self-assigned this Aug 26, 2019
@AlexPeshkoff
Copy link
Member

That fix just hides a problem, not fixes it. Macro in conf file should be case-insensitive, i.e. one can type in a databases.conf: $(DIR_SAMPLEDB), $(dir_sampledb) or even $(DiR_sAmPlEdB) and that all should work.

@AdrianBunk
Copy link

@AlexPeshkoff The problem is that uppercase/lowercase (like sort order) depends on the locale even for ASCII.

The lowercase of DIR_SAMPLEDB might be dir_sampledb or dır_sampledb (dotless ı) depending on the locale.

@aafemt
Copy link
Contributor

aafemt commented Jan 15, 2024

ASCII has no "dotless i" character.

@AdrianBunk
Copy link

ASCII has no "dotless i" character.

But the large I in ASCII might be lowercased to dotless ı depending on the locale.

This is similar to e.g. wrongly assuming that z would not be sorted between s and t - whether that's true depends on the locale. English has z at the end of the alphabet but that's not true for every language.

@aafemt
Copy link
Contributor

aafemt commented Jan 15, 2024

ASCII is a very specific American charset. Only American locale rules can be applied to it.

@AdrianBunk
Copy link

ASCII is a very specific American charset. Only American locale rules can be applied to it.

To make you nitpicker happy, let me correct myself:

The problem is that uppercase/lowercase (like sort order) depends on the locale even for the 26 characters that are also in ASCII.

@aafemt Is this a correct statement, so that you can now fix the bug?

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

4 participants