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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JakubWiniarczk
Frequent Visitor

PowerQuery - Web.Page(File.Contents) - encoding

Hey Everyone !

 

I need some help with 'Web.Page(File.Contents' in Power Query. I'm importing some .html file which has xml structure. In the file I can see information about encoding and xml stadard:

 

<?xml version="1.0" encoding="windows-1250"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

 

But when I imported it in PowerBI,  I have a problem with encoding ( polish characters ). 

PowerBi - encoding.png

PowerBi - encoding in HTML.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Do you have any idea how to fix it ?

Thanks !

 

Regards ! 

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Curious why you are using File.Contents instead of XML.Document? XML.Document you can specify the encoding:

 

https://docs.microsoft.com/en-us/powerquery-m/xml-document

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hye,

 

thanks for the quick reply.

When I tried to open HTML file like XML - system automatically changing   xml.content into web.page file content.

When I've changed the file extension for .xml - there is some problem with correctly parsing so I can't use it. 

 

Regards! 

Hey

 

I fixed the problem by converting a file from windows-1250 into UTF via iconv ( linux ).

Thanks a lot! 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors