Fix Turkish culture (dotless-i) corruption of SQL identifiers#2480
Merged
Conversation
Replace culture-sensitive ToLower() with ToLowerInvariant() in all SQL identifier normalization paths. In Turkish locale, 'I'.ToLower() produces dotless 'ı' instead of 'i', corrupting SQL names such as queue/table identifiers used in envelope storage. Affects SqlServerTransport, PostgresqlTransport, MySqlTransport, SqliteTransport, and SagaTableDefinition. Adds a regression test that verifies SanitizeIdentifier behaves correctly under tr-TR culture. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jeremydmiller
added a commit
to JasperFx/weasel
that referenced
this pull request
Apr 9, 2026
…QL identifiers In Turkish locale (tr-TR), String.ToLower() converts 'I' to dotless 'ı' (U+0131) instead of 'i', corrupting SQL identifiers (e.g. INFORMATION_SCHEMA → ınformation_schema). Replace all .ToLower()/.ToUpper() calls that operate on SQL identifiers, schema names, column names, type names, and keywords with .ToLowerInvariant()/.ToUpperInvariant(). Adds unit tests that set CultureInfo.CurrentCulture = tr-TR to verify correct normalization. Upstream fix for JasperFx/wolverine#2472 (companion PR to JasperFx/wolverine#2480). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
jeremydmiller
added a commit
to JasperFx/weasel
that referenced
this pull request
Apr 9, 2026
…QL identifiers In Turkish locale (tr-TR), String.ToLower() converts 'I' to dotless 'ı' (U+0131) instead of 'i', corrupting SQL identifiers (e.g. INFORMATION_SCHEMA → ınformation_schema). Replace all .ToLower()/.ToUpper() calls that operate on SQL identifiers, schema names, column names, type names, and keywords with .ToLowerInvariant()/.ToUpperInvariant(). Adds unit tests that set CultureInfo.CurrentCulture = tr-TR to verify correct normalization. Upstream fix for JasperFx/wolverine#2472 (companion PR to JasperFx/wolverine#2480). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 11, 2026
This was referenced Apr 18, 2026
This was referenced Apr 25, 2026
This was referenced May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2472 — SQL Server Turkish collation causes envelope storage setup errors.
ToLower()withToLowerInvariant()in all SQL identifier normalization pathstr-TR),"I".ToLower()produces dotlessıinstead ofi, corrupting SQL object names used in envelope storage (queue/table identifiers, saga table names)SqlServerTransport,PostgresqlTransport,MySqlTransport,SqliteTransport, andSagaTableDefinitionRoot cause
SanitizeIdentifier()in each transport anddefaultTableName()inSagaTableDefinitionwere usingString.ToLower()(culture-sensitive). Undertr-TRculture, uppercaseImaps to dotlessı(U+0131) rather thani(U+0069), producing invalid SQL identifiers likeıncominginstead ofincoming.Test plan
sanitize_identifier_is_culture_invariantthat setsCultureInfo.CurrentCulturetotr-TRand verifiesSanitizeIdentifier("INCOMING")returns"incoming"(not"ıncoming")SqlServerTestswith SQL Server available to verify integration tests pass🤖 Generated with Claude Code