<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic REST API Injected data - special local letter do not show correctly. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Injected-data-special-local-letter-do-not-show/m-p/306729#M9022</link>
    <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making a solution for a customer that grabs some data from a couple of REST web services using PowerShell.&lt;/P&gt;&lt;P&gt;then it injects to PowerBI using the PowerBI REST API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do this I am using this powershell wrapper/module:&lt;/P&gt;&lt;P&gt;&lt;A title="" href="https://github.com/DevScope/powerbi-powershell-modules" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/DevScope/powerbi-powershell-modules&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works great! Except that the danish letters æ,ø,å does not show correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I can see that my source data is correct, outputted in powerShell shows æ,ø,å correctly.&lt;/P&gt;&lt;P&gt;2. Module uses Invoke-RestMethod to send the data.&lt;/P&gt;&lt;P&gt;3. I have tried to set "charset"= "utf-8" in the headers for the sending of the data.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'application/json; charset=utf-8'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;4. Data seems to show OK if I try to get something direct from a REST web service that also has æ,ø,å. (But I cannot use this method as the datasources does not support my other rest webservice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but you see, they show like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/340917a0dec8a2f77ebec13911ee75e884ff1feb/68747470733a2f2f757365722d696d616765732e67697468756275736572636f6e74656e742e636f6d2f333436303830372f33323935343935362d64636664623165362d636262342d313165372d383434312d6133393465616464343137302e706e67" alt="https://user-images.githubusercontent.com/3460807/32954956-dcfdb1e6-cbb4-11e7-8441-a394eadd4170.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can confirn that it is not only the visual that does not show it, as I cannot make filters on data using any of the letters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know where this fails? and how to fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2017 11:33:30 GMT</pubDate>
    <dc:creator>JakobGsvendsen</dc:creator>
    <dc:date>2017-11-20T11:33:30Z</dc:date>
    <item>
      <title>REST API Injected data - special local letter do not show correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Injected-data-special-local-letter-do-not-show/m-p/306729#M9022</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making a solution for a customer that grabs some data from a couple of REST web services using PowerShell.&lt;/P&gt;&lt;P&gt;then it injects to PowerBI using the PowerBI REST API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do this I am using this powershell wrapper/module:&lt;/P&gt;&lt;P&gt;&lt;A title="" href="https://github.com/DevScope/powerbi-powershell-modules" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/DevScope/powerbi-powershell-modules&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works great! Except that the danish letters æ,ø,å does not show correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I can see that my source data is correct, outputted in powerShell shows æ,ø,å correctly.&lt;/P&gt;&lt;P&gt;2. Module uses Invoke-RestMethod to send the data.&lt;/P&gt;&lt;P&gt;3. I have tried to set "charset"= "utf-8" in the headers for the sending of the data.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'application/json; charset=utf-8'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;4. Data seems to show OK if I try to get something direct from a REST web service that also has æ,ø,å. (But I cannot use this method as the datasources does not support my other rest webservice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but you see, they show like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/340917a0dec8a2f77ebec13911ee75e884ff1feb/68747470733a2f2f757365722d696d616765732e67697468756275736572636f6e74656e742e636f6d2f333436303830372f33323935343935362d64636664623165362d636262342d313165372d383434312d6133393465616464343137302e706e67" alt="https://user-images.githubusercontent.com/3460807/32954956-dcfdb1e6-cbb4-11e7-8441-a394eadd4170.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can confirn that it is not only the visual that does not show it, as I cannot make filters on data using any of the letters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know where this fails? and how to fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 11:33:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Injected-data-special-local-letter-do-not-show/m-p/306729#M9022</guid>
      <dc:creator>JakobGsvendsen</dc:creator>
      <dc:date>2017-11-20T11:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Injected data - special local letter do not show correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Injected-data-special-local-letter-do-not-show/m-p/307000#M9032</link>
      <description>&lt;P&gt;seems to be a powerShell issue for invoke-restmehtod and invote-websrequest as they cannot send as UTF8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have rewritten my powershell to make a call.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/walkthrough-push-data-add-rows" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/walkthrough-push-data-add-rows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will send pull request to update the moduel asap, and then i hope he accepts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prototype code (not pretty but works :)):&lt;/P&gt;&lt;PRE&gt;Function Invoke-PBIWebRequestPost {
param($Uri, $Headers,$Body)

  # Remove NewLine from json
  $Body = $Body -replace "$([Environment]::NewLine) *",""  

	write-verbose "Posting data to URL: $Uri"
    $request = [System.Net.WebRequest]::Create($uri) -as [System.Net.HttpWebRequest];
	$request.KeepAlive = $false;
	$request.Method = "POST";
	$request.ContentLength = 0;
    $request.TimeOut = 100000; #5 minute timout
	

	
            #Add token to the request header
            foreach($key in $headers.Keys)
            {

            switch($key){
            "Content-Type"{
                $request.ContentType = $headers[$key];
            }
            default {
                $request.Headers.Add($key, $headers[$key]);
            }
            }
          

            
            }

            
            $rowsJson = $Body

			$utf8Bytes = [System.Text.Encoding]::UTF8.GetBytes($Body)
			$request.ContentLength = $utf8Bytes.Length
			$postStream = $request.GetRequestStream()
			$postStream.Write($utf8Bytes, 0, $utf8Bytes.Length)
			#Write-String -stream $postStream -string $JSON
			$postStream.Dispose()
		
			try
			{
			  #[System.Net.HttpWebResponse] $response = [System.Net.HttpWebResponse] $request.GetResponse()
			  $response = $request.GetResponse()
			}
			catch
			{
			  $response = $Error[0].Exception.InnerException.Response; 
			  Throw "Exception occurred in $($MyInvocation.MyCommand): `n$($_.Exception.Message)"
			}
		
			$reader = [IO.StreamReader] $response.GetResponseStream()  
			$output = $reader.ReadToEnd()  
		
			$reader.Close()  
			$response.Close()
			return $output  
			
			

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Nov 2017 19:44:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Injected-data-special-local-letter-do-not-show/m-p/307000#M9032</guid>
      <dc:creator>JakobGsvendsen</dc:creator>
      <dc:date>2017-11-20T19:44:26Z</dc:date>
    </item>
  </channel>
</rss>

