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

[BUG] Dump SQL Server encoding error #1462

Open
Drilmo opened this issue Mar 14, 2025 · 2 comments
Open

[BUG] Dump SQL Server encoding error #1462

Drilmo opened this issue Mar 14, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Drilmo
Copy link

Drilmo commented Mar 14, 2025

I think there's an encoding error when dumping the structure and the data, in fact in the inserts for the values & I had & on nvarchar which crashed the insert request, I had to apply a replace following the following regex :

(N'(?:[^']|'')&)(amp;)((?:[^']|'')')

And replace with group 1 and 3 to remove the amp;

@Drilmo Drilmo added the bug Something isn't working label Mar 14, 2025
@cweijan
Copy link
Owner

cweijan commented Mar 14, 2025

The single quote ' is not escaped. What other wrong symbols have you encountered? I will fix it in the next version.

@Drilmo
Copy link
Author

Drilmo commented Mar 18, 2025

When the value contain & he is exported as & and it not work on insert.

Another problem, when I dump structure and data, in the create table all field names are enclosed in double quotes, but not in insert into, which poses a problem when there are spaces or ' in the field name when inserting into.
You'd have to either enclose them in “ or square brackets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants