Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Bhatt23
New Member

Converting Document display name from Y2020 行业应用案例单页汇总.pdf to normal character

Hi Guys,

I need your urgent support with a bizzare case wherein I am importing Data from a Json file which is extracting data from API call using power shell script. So, in this there are multiple columns but I am pulling Document Display name out of all which has different document name according to the country but in Json itself the document name is getting changed to 

Y2020 行业应用案例单页汇总.pdf which is not correct name it is getting changed for all the documents name with letters apart from English. Also while looking into the text file in Visual Studio I found this pop up "This file has large number non basic ascii unicode characters".

So while importing JSON file in Power BI I tried below formula in Power query to change to UTF16 as per the previous post in cummunity below screenshot is the result, Also tried UTF8 nothing changed.

#"Added Custom" = Table.AddColumn(#"Duplicated Column", "Custom", each Text.FromBinary(Text.ToBinary([#"displayName - Copy"], 1251), TextEncoding.Utf16))

But it is changing all the names even if it is English as per the below screenshot.

Bhatt23_0-1698765612208.png


What I want to achieve is to convert only the name without normal English character to there original character.
Let me know in case anyone has any clue about this or can help.

7 REPLIES 7
pfarias
Helper I
Helper I

In the sample 'Y2020 行业应用案例单页汇总.pdf', what the result expect?

Y2020 行业应用案例单页汇总.pdf this is the expected result for the example I have shared but this column contains mix of all the display name like some in english some in chinese some Japanese etc. the one in english is fine but only issue is with other language like this example one.

If this is expected result, the erro is before the 'Y2020 行业应用案例单页汇总.pdf'. Because these characters I'll not be convert to Y2020 行业应用案例单页汇总.pdf.

 

Can you talk more about how is generated this encoding char?

Thanks for your response, well this 'Y2020 行业应用案例单页汇总.pdf' code is generated via a export file. Actually we are running to API call to extract these details from a external App which is creating JSON file and default file format is UTF-8 but only characters apart from English is getting converted to this code.
Let me know in case you need more information on this please.

Bhatt23
New Member

It will be great help if anyone can help or advise the best solution guys really appreciate.

pfarias
Helper I
Helper I

Try use Encoding 1200 instead 1251.

#"Added Custom" = Table.AddColumn(#"Duplicated Column", "Custom", each Text.FromBinary(Text.ToBinary([#"displayName - Copy"], 1200), TextEncoding.Utf16))

 

Hey thanks for your input.

#"Added Custom" = Table.AddColumn(#"Duplicated Column", "Custom", each Text.FromBinary(Text.ToBinary([#"displayName - Copy"], 1200), TextEncoding.Utf16))

I tried 1200 nothing changed same result.

Bhatt23_0-1698776957291.png

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors