cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Regular Visitor

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

5 REPLIES 5
Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

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

 

 

Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

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

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Problem of patching chinese character to Azure SQL

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

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,155)