Skip to content

fix: support Russian collating sort order (LCID 1049) for text indexes#5

Merged
spannm merged 1 commit intospannm:masterfrom
tiger-seo:fix/russian-sort-order-lcid-1049
Apr 1, 2026
Merged

fix: support Russian collating sort order (LCID 1049) for text indexes#5
spannm merged 1 commit intospannm:masterfrom
tiger-seo:fix/russian-sort-order-lcid-1049

Conversation

@tiger-seo
Copy link
Copy Markdown
Contributor

Jackcess previously threw UnsupportedOperationException for any write operation
on a table with a text index using the Russian/Cyrillic sort order (LCID 1049).
This blocked all INSERT/UPDATE statements via UCanAccess on Russian-locale
Access databases.

Changes:

  • ColumnImpl: add RUSSIAN_SORT_ORDER constant (LCID 1049, version 0)
  • ColumnImpl.SortOrder: update Javadoc table to document both Turkish and
    Russian sort orders as supported (interim implementation)
  • IndexData.newColumnDescriptor(): dispatch RUSSIAN_SORT_ORDER to new
    RussianTextColumnDescriptor instead of falling through to
    ReadOnlyColumnDescriptor
  • IndexData.RussianTextColumnDescriptor: new inner class; delegates
    writeNonNullValue() to GeneralLegacyIndexCodes to produce structurally
    valid MS Access index bytes; honours isAscending() for DESC indexes
  • IndexData: update class-level and method Javadoc to include Russian

Trade-off: Russian/Cyrillic-specific collation weights are not yet encoded
correctly. Index-based ORDER BY on Russian text may sort in General-Legacy
rather than Russian order. A Compact & Repair in MS Access will rebuild the
index with full Russian collation. A complete fix requires reverse-engineering
the MS Access byte tables for LCID 1049 (see RussianTextColumnDescriptor
Javadoc).

Relates to: ucanaccess#35 (applied same fix pattern as Turkish LCID 1055)

@tiger-seo
Copy link
Copy Markdown
Contributor Author

@spannm hello, can you please merge my PR and do a release ? 😃

Jackcess previously threw UnsupportedOperationException for any write operation
on a table with a text index using the Russian/Cyrillic sort order (LCID 1049).
This blocked all INSERT/UPDATE statements via UCanAccess on Russian-locale
Access databases.

Changes:
- ColumnImpl: add RUSSIAN_SORT_ORDER constant (LCID 1049, version 0)
- ColumnImpl.SortOrder: update Javadoc table to document both Turkish and
  Russian sort orders as supported (interim implementation)
- IndexData.newColumnDescriptor(): dispatch RUSSIAN_SORT_ORDER to new
  RussianTextColumnDescriptor instead of falling through to
  ReadOnlyColumnDescriptor
- IndexData.RussianTextColumnDescriptor: new inner class; delegates
  writeNonNullValue() to GeneralLegacyIndexCodes to produce structurally
  valid MS Access index bytes; honours isAscending() for DESC indexes
- IndexData: update class-level and method Javadoc to include Russian

Trade-off: Russian/Cyrillic-specific collation weights are not yet encoded
correctly. Index-based ORDER BY on Russian text may sort in General-Legacy
rather than Russian order. A Compact & Repair in MS Access will rebuild the
index with full Russian collation. A complete fix requires reverse-engineering
the MS Access byte tables for LCID 1049 (see RussianTextColumnDescriptor
Javadoc).

Relates to: ucanaccess#35 (applied same fix pattern as Turkish LCID 1055)
@spannm spannm force-pushed the fix/russian-sort-order-lcid-1049 branch from ebc627a to 66fb383 Compare April 1, 2026 17:31
@spannm spannm added the enhancement New feature or request label Apr 1, 2026
@spannm
Copy link
Copy Markdown
Owner

spannm commented Apr 1, 2026

Thanks for your contribution, @tiger-seo
welcome Russia 🇷🇺 sort order to Jackcess

@spannm spannm closed this Apr 1, 2026
@spannm spannm reopened this Apr 1, 2026
@spannm spannm merged commit c750864 into spannm:master Apr 1, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants