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

Arabic Characters not preserved when sending archive to MS SQL database #48

Open
KEE67 opened this issue Jul 26, 2023 · 2 comments
Open

Comments

@KEE67
Copy link

KEE67 commented Jul 26, 2023

I have created a SIARD archive from a MS SQL database which contains some arabic text (nvarchar). The text is exported correctly and I can see the arabic characters when I browse the data in the DBPTK GUI. However when I send the archive to a new MS SQL database the columns are created as varchar columns and consequently the arabic characters are not preserved but show as '????'. If I create the table in the database with nvarchar columns before sending the archive the arabic characters are imported correcly.

@luis100
Copy link
Member

luis100 commented Jul 26, 2023

What are the options you would use to create the table in the database? Do you select a specific encoding for the nvarchar columns?

@KEE67
Copy link
Author

KEE67 commented Jul 27, 2023

The database collation is SQL_Latin1_General_CP1_CI_AS and I do not use a special collation for the nvarchar columns. The type name in the siard extract shows as NATIONAL CHARACTER VARYING (255), original type nvarchar. The script for the table creation after importing shows as
CREATE TABLE [dbo].[Firstnames](
[FIRST NAME (English)] varchar NULL,
[FIRST NAME (Arabic)] varchar NULL,
[Status] varchar NULL,
[Observations] varchar NULL,
[Type] varchar NULL
) ON [PRIMARY]
If I drop that table and create the table with the following script the arabic characters are imported correctly.
CREATE TABLE [dbo].[Firstnames](
[FIRST NAME (English)] nvarchar NULL,
[FIRST NAME (Arabic)] nvarchar NULL,
[Status] nvarchar NULL,
[Observations] nvarchar NULL,
[Type] nvarchar NULL
) ON [PRIMARY]
This is only one of the tables in the database that has arabic data - there are more than 70 columns that could contain arabic data and the same problem occurs in all of them.

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

No branches or pull requests

2 participants