Problem with UTF-8 when stored string with "varchar" type on MS SQL

Dear Cuba Team,

My database stored on MS SQL. Entity “Product” have some attributes type “String”.
When create product and save, data type string in UTF-8 losing format. you can see in attachment.
Problem: MS SQL stored UTF-8 string with “nvarchar” type, but CUBA-PLATFORM automatic create column with “varchar” type. If I’m changing value “varchar” to “nvarchar” , then prolem is solving. but it not comfortable and difficult controls source code when update data base.

create table ICVRETAIL_PRODUCTS (
ID uniqueidentifier,
VERSION integer not null,
CREATE_TS datetime,
CREATED_BY varchar(50),
UPDATE_TS datetime,
UPDATED_BY varchar(50),
DELETE_TS datetime,
DELETED_BY varchar(50),

IS_FOLDER tinyint,
PARENT_ID uniqueidentifier,
NUMBER_ bigint,
DESCRIPTION varchar(255),
PRICE decimal(19, 2),
UNIT varchar(50),
BARCODE varchar(255),
NOTE varchar(max),

primary key nonclustered (ID)
)

error UTF-8

1 Like

Hi,

We are going to introduce the ability to specify an arbitrary column definition for an attribute in Studio. See the linked YouTrack issue. Do you think it resolves your problem?

Yes, it resolves my problem. Waiting new release version 6.6.
Thank you!

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/STUDIO-3720