Repository navigation
Fix Firebird SJIS_0208 character set mapping - #40593
Open
dragonknightk wants to merge 1 commit into
Open
dragonknightk wants to merge 1 commit into
dragonknightk wants to merge 1 commit into
Conversation
Closes issue 40243 Changes proposed in this pull request: - Map `FirebirdCharacterSets.SJIS_0208` to Java `Shift_JIS` instead of `ISO-2022-JP` so Firebird Proxy decodes Shift-JIS text on `SJIS_0208` connections without turning Japanese characters into U+FFFD replacement characters. - Use `Shift_JIS` instead of Jaybird's `MS932` to match the Firebird 5.0.4 server. Firebird defines `SJIS_0208` on standard JIS X 0208 Shift-JIS rather than Windows-31J. Mapping to `MS932` would accept Windows extensions and remap JIS symbols like `0x8160` to `U+FF5E` instead of `U+301C`, which differs from what the Firebird server stores and breaks round-trip transliteration on `SJIS_0208` columns. This also matches the other standard IANA mappings in `FirebirdCharacterSets`, such as `KSC_5601` to `EUC-KR`. - Add a unit test verifying that `SJIS_0208` resolves to `Shift_JIS` and decodes Shift-JIS bytes for `日本語` to the expected text. - Local verification scope: installed upstream dependencies with `-pl proxy/backend/dialect/firebird,proxy/frontend/dialect/firebird -am -DskipTests -DskipITs`, then ran unit tests, `spotless:check`, and `checkstyle:check` (`-Pcheck`) for `proxy/backend/dialect/firebird` and `proxy/frontend/dialect/firebird`, plus `apache-rat:check -Pcheck` across the repository. --- Before submitting this PR, I confirm that: - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project. - [x] I have reviewed my changes. - [ ] I have (or in comment I request) added corresponding labels for the pull request. (maintainer to add labels) - [x] I have passed the required local checks: `./mvnw clean install -B -T1C -Pcheck`. - [ ] I have updated the relevant documentation, if applicable. - [x] I have added or updated unit tests for my changes, if applicable. - [x] I have updated the Release Notes of the current development version, if applicable. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/). - [ ] I have disclosed the tool and affected files or scope for any material AI assistance, as required by the [AI-assisted contribution policy]. [AI-assisted contribution policy]: https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md Signed-off-by: DragonKnightK <37928252+dragonknightk@users.noreply.github.com>
This branch has not been deployed
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.
Fixes #40243.
Changes proposed in this pull request:
FirebirdCharacterSets.SJIS_0208to JavaShift_JISinstead ofISO-2022-JPso Firebird Proxy decodes Shift-JIS text onSJIS_0208connections without turning Japanese characters into U+FFFD replacement characters.Shift_JISinstead of Jaybird'sMS932to match the Firebird 5.0.4 server. Firebird definesSJIS_0208on standard JIS X 0208 Shift-JIS rather than Windows-31J. Mapping toMS932would accept Windows extensions and remap JIS symbols like0x8160toU+FF5Einstead ofU+301C, which differs from what the Firebird server stores and breaks round-trip transliteration onSJIS_0208columns. This also matches the other standard IANA mappings inFirebirdCharacterSets, such asKSC_5601toEUC-KR.SJIS_0208resolves toShift_JISand decodes Shift-JIS bytes for日本語to the expected text.-pl proxy/backend/dialect/firebird,proxy/frontend/dialect/firebird -am -DskipTests -DskipITs, then ran unit tests,spotless:check, andcheckstyle:check(-Pcheck) forproxy/backend/dialect/firebirdandproxy/frontend/dialect/firebird, plusapache-rat:check -Pcheckacross the repository.Before submitting this PR, I confirm that:
./mvnw clean install -B -T1C -Pcheck.AI Disclosure
Human-led contribution. Grok Bot, working for dragonknightk, assisted with the code, tests, and description in proxy/backend/dialect/firebird and RELEASE-NOTES.md. All submitted content was reviewed and verified by a human before submission.