<?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 Problems with encoding in ArcGIS Workforce Questions</title>
    <link>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1204109#M2480</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using this script in order to get all my assigments.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/workforce-scripts/blob/master/readmes/export_assignments_to_csv_readme.md" target="_blank"&gt;https://github.com/Esri/workforce-scripts/blob/master/readmes/export_assignments_to_csv_readme.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Some of the assignments text is in Hebrew.&lt;/P&gt;&lt;P&gt;The text i'm getting is:&lt;/P&gt;&lt;P&gt;׳&amp;nbsp;׳©׳œ׳—׳” ׳₪׳&amp;nbsp;׳™׳”: 28/04/2022 06:43׳¢׳¨׳&amp;#158;׳” ׳©׳œ ׳’׳–׳&amp;#157; ׳¢׳¦׳™׳&amp;#157; ׳©׳œ ׳’׳&amp;nbsp;׳™׳&amp;#157; ׳•׳&amp;nbsp;׳•׳£&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did:&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;/P&gt;&lt;P&gt;On the top of my python file.&lt;/P&gt;&lt;P&gt;I have opened the file with notepad++ and converted it to UTF-8 without BOM.&lt;/P&gt;&lt;P&gt;I'm using UTF-8 encoding while reading the file:&lt;/P&gt;&lt;P&gt;with open(arguments.csv_file, 'w', newline='', encoding='utf-8') as csv_file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything i'm missing here?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2022 09:35:35 GMT</pubDate>
    <dc:creator>MaozTreeCare</dc:creator>
    <dc:date>2022-08-18T09:35:35Z</dc:date>
    <item>
      <title>Problems with encoding</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1204109#M2480</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using this script in order to get all my assigments.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/workforce-scripts/blob/master/readmes/export_assignments_to_csv_readme.md" target="_blank"&gt;https://github.com/Esri/workforce-scripts/blob/master/readmes/export_assignments_to_csv_readme.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Some of the assignments text is in Hebrew.&lt;/P&gt;&lt;P&gt;The text i'm getting is:&lt;/P&gt;&lt;P&gt;׳&amp;nbsp;׳©׳œ׳—׳” ׳₪׳&amp;nbsp;׳™׳”: 28/04/2022 06:43׳¢׳¨׳&amp;#158;׳” ׳©׳œ ׳’׳–׳&amp;#157; ׳¢׳¦׳™׳&amp;#157; ׳©׳œ ׳’׳&amp;nbsp;׳™׳&amp;#157; ׳•׳&amp;nbsp;׳•׳£&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did:&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;/P&gt;&lt;P&gt;On the top of my python file.&lt;/P&gt;&lt;P&gt;I have opened the file with notepad++ and converted it to UTF-8 without BOM.&lt;/P&gt;&lt;P&gt;I'm using UTF-8 encoding while reading the file:&lt;/P&gt;&lt;P&gt;with open(arguments.csv_file, 'w', newline='', encoding='utf-8') as csv_file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything i'm missing here?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 09:35:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1204109#M2480</guid>
      <dc:creator>MaozTreeCare</dc:creator>
      <dc:date>2022-08-18T09:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with encoding</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1205146#M2486</link>
      <description>&lt;P&gt;The header of the Python file only affects the encoding of the text within the script, so probably is unrelated. Opening the input with 'utf-8' looks correct, I would check that the database is correctly storing the information as UTF-8 (e.g. it wasn't reencoded into something else during storage), and you can stop your script at the point of execution to check what Python thinks its seeing. If you add `breakpoint()` to your code, you'll get the PDB debugger which will allow you to inspect the state.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 20:28:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1205146#M2486</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2022-08-22T20:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with encoding</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1205270#M2487</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;I have managed to figure out the issue was not with GIS or python at all... but the Excel!&lt;/P&gt;&lt;P&gt;It did not open UTF-8 CSV files corretly...&lt;/P&gt;&lt;P&gt;I had to change the open code to&amp;nbsp;&lt;/P&gt;&lt;P&gt;with open(arguments.csv_file, 'w', newline='', encoding='utf-8-sig') as csv_file:&lt;/P&gt;&lt;P&gt;only using&amp;nbsp;utf-8-sig' (BOM) excel was able to figure out that the file is in UTF-8 format.&lt;/P&gt;&lt;P&gt;I should have checked the file itself, the text was written correctly...&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 06:11:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/problems-with-encoding/m-p/1205270#M2487</guid>
      <dc:creator>MaozTreeCare</dc:creator>
      <dc:date>2022-08-23T06:11:25Z</dc:date>
    </item>
  </channel>
</rss>

