web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem of patching ch...
Power Apps
Unanswered

Problem of patching chinese character to Azure SQL

(0) ShareShare
ReportReport
Posted on by 11

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

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    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,

  • Gary2019 Profile Picture
    11 on at

    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

     

     

  • v-xida-msft Profile Picture
    on at

    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,

     

  • Verified answer
    Gary2019 Profile Picture
    11 on at

    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

  • Community Power Platform Member Profile Picture
    on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard