<?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 Re: Scripting Tools: Specify file encoding in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135707#M63551</link>
    <description>&lt;P&gt;did you set the encoding in Notepad ++? and it didn't work?&lt;/P&gt;&lt;P&gt;then load the *.py into plain old Notepad, add the line to the top of the script, then try it in your ide&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 00:55:59 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-01-21T00:55:59Z</dc:date>
    <item>
      <title>Scripting Tools: Specify file encoding</title>
      <link>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135283#M63541</link>
      <description>&lt;P&gt;I'm making a scripting tool, and embedding the script in the tool when I'm done.&lt;/P&gt;&lt;P&gt;If I try to edit the script after doing this, I run into this message&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1642645233214.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31855i4578C9CCD9BC9D77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1642645233214.png" alt="AlfredBaldenweck_0-1642645233214.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The file's encoding is invalid for Python 3.x. IDLE will convert it to UTF-8. What is the current encoding of the file?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I haven't had this pop up at all before, despite doing this same thing with other script tools, including previous versions of this same tool.&lt;/P&gt;&lt;P&gt;The script is just a normal .py file, created in Notepad++&lt;/P&gt;&lt;P&gt;What does this message mean? What do I enter to let me edit it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 02:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135283#M63541</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2022-01-20T02:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Tools: Specify file encoding</title>
      <link>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135307#M63542</link>
      <description>&lt;P&gt;Add this to the top of your scripts on the first line&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# -*- coding: utf-8 -*-&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 04:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135307#M63542</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-20T04:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Tools: Specify file encoding</title>
      <link>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135697#M63550</link>
      <description>&lt;P&gt;I just tried this and got the same error. Iʻm very confused.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 23:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135697#M63550</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2022-01-20T23:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Tools: Specify file encoding</title>
      <link>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135707#M63551</link>
      <description>&lt;P&gt;did you set the encoding in Notepad ++? and it didn't work?&lt;/P&gt;&lt;P&gt;then load the *.py into plain old Notepad, add the line to the top of the script, then try it in your ide&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 00:55:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-tools-specify-file-encoding/m-p/1135707#M63551</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-21T00:55:59Z</dc:date>
    </item>
  </channel>
</rss>

