Repository navigation
fix(plugin-oracle): keep NCHAR text on a non-Unicode database charset - #3282
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
This branch was successfully 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.
Why
On an Oracle database whose own character set is not Unicode (WE8MSWIN1252 measured), saving Lao text into an NCHAR, NVARCHAR2 or NCLOB cell stored
¿¿¿with no error, and an update or delete matched on such text edited the corrupted row or none. The grid wrote the value as a plain literal, which the server converts through the database character set before the national one.Change
UNISTR('\0EA5...'), in SET, VALUES and row matches. ASCII text keeps the plain literal.UNISTRcall stays under 4,000 bytes both as a literal and as its result; NCLOB pieces are joined throughTO_NCLOB. A single call past that limit was silently cut to 2,000 characters on AL16UTF16.check-oracle-national-charset.shwrites and matches the way a grid save does.Verified
Unit tests for the writer. The probe passes on WE8MSWIN1252/AL16UTF16, AL32UTF8/UTF8 and AL32UTF8/AL16UTF16: writes, NVARCHAR2 and padded NCHAR matches, a 1,000,000-character NCLOB.
Not in this PR