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

Update class-wpdb.php to support NVARCHAR #516

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

Conversation

srutzky
Copy link
Contributor

@srutzky srutzky commented Nov 21, 2023

This fixes #515 .

Add "N" prefix to quoted string substitution when preparing SQL for execution. This will change string literals to be interpreted as NVARCHAR (i.e. Unicode / UTF-16) instead of VARCHAR (i.e. an 8-bit encoding, which changes all characters not in the associated code page to "?"s).

PLEASE NOTE: I don't have time to test this fix. If it helps, there are some notes on what should be tested in PR #422 .

Add "N" prefix to quoted string substitution when preparing SQL for execution. This will change string literals to be interpreted as NVARCHAR (i.e. Unicode / UTF-16) instead of an 8-bit encoding (which changes all characters not in the associated code page to "?"s).
@LarnuUK
Copy link

LarnuUK commented Jul 11, 2024

Tested in 6.5.3 and appears to work without issue.

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.

Regression of non-ANSI strings handing in 6.2.0
2 participants