cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Gary2019
Level: Powered On

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
Gary2019
Level: Powered On

Re: Problem of patching chinese character to Azure SQL

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

4 REPLIES 4
Community Support Team
Community Support Team

Re: Problem of patching chinese character to Azure SQL

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.
Gary2019
Level: Powered On

Re: Problem of patching chinese character to Azure SQL

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

 

 

Community Support Team
Community Support Team

Re: Problem of patching chinese character to Azure SQL

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.
Gary2019
Level: Powered On

Re: Problem of patching chinese character to Azure SQL

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,807)