cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Problem of patching chinese character to Azure SQL

Hi, 

 

I am new to powerapps. I am now try to use patch function to update Azure Sql. 

I found that the inputted chinese character will be changed to ?? in Azure SQL.

There is no way for me to modify the inputted text into N'chinese text' and my azure sql collation is set: SQL_Latin1_General_CP1_CI_AS which cannot be changed. 

 

So, is there any suggestion to solve such problem?

 

Thanks a lot.

 

Gary

1 ACCEPTED SOLUTION

Accepted Solutions
Regular Visitor

Dear Karis,

 

Thanks for your advice.

Finally, the problem is solved by creating a new database and choosing the chinese collation:  Chinese_Taiwan_Stroke_CI_AS in the beginning.

 

Now no matter I input traditional chinese, simplied chinese or even Japanese characters, the azure sql table shows the correct encoding. 

 

Thanks a lot.

 

Best regards,

 

Gary

View solution in original post

5 REPLIES 5
Community Support
Community Support

Hi @Gary2019 ,

Which type column do you use in your Azure SQL Table to store the chinese character? varchar or nvarchar type column?

 

Based on the issue that you mentioned, I think this issue may be related to character encode in your Azure SQL Table. If you want to store the chinese characte in your SQL Table, please consider set up a nvarchar type column to store the chinese character rather than use varchar type column.

 

On your side, please consider add a nvarchar type column in your SQL Table or convert the existing varchar type column into nvarchar type column, then store the text passed from your app into this nvarchar type column, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Kris,

 

Thanks for your support.

I have double checked the Azure SQL column data type. It is "nvarchar".

The CHARACTER_SET_NAME is "Unicode".

Collation_Name is "SQL_Latin1_General_CP1_CI_AS".

 

In face the Azure SQL data table is also linked with MS Access (as front end application). Once I  updated chinese character to column record , it works.

 

As I know there is only one way to pass chinese character to Azure SQL: That is adding character 'N' in front of the chinese character. However, powerapps will treat such text expression ( N'Chinese Text' ) as wrong expression. 

 

For example:

Patch('[dbo].[Customer]', Defaults('[dbo].[Customer]'),{LastName: N'陳生'})

 

Powerapps will pop up error message : 函數 Patch 有一些無效的引數 ( In English, I think is :  Function Patch has some invalid arguments).

 

Should I change the Azure SQL collation to traditional chinese?

If the collation is changed to traditional chinese, what happen is somebody input Japanese character?

 

Anyway, many thanks for your suggestion and looking forward to solve the problem 🙂

 

Regards,

 

Gary

 

 

Hi @Gary2019 ,

Have you taken a try to change the CHARACTER_SET in your SQL Table into UTF-8?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please do not add N'' to wrap the character text value you want to patch. Modify your formula as below:

 

Patch('[dbo].[Customer]', Defaults('[dbo].[Customer]'),{LastName: "陳生"})

 

 

In addition, please consider take a try to insert a new record along with Chinese characters within your SQL Server itself using SQL Syntax:

 

insert into '[dbo].[Customer]' (LastName) values (N'陳生')

then check if the Chinese characters could be saved into your SQL Table successfully. If above SQL Syntax works, I think this issue is related to PowerApps character mechanism.

 

Please consider submit an assisted support ticket for further help through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

Dear Karis,

 

Thanks for your advice.

Finally, the problem is solved by creating a new database and choosing the chinese collation:  Chinese_Taiwan_Stroke_CI_AS in the beginning.

 

Now no matter I input traditional chinese, simplied chinese or even Japanese characters, the azure sql table shows the correct encoding. 

 

Thanks a lot.

 

Best regards,

 

Gary

View solution in original post

@Gary2019, can your database now store both english and chinese characters?

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (34,558)