<?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: replace accented characters with the field calculator in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191963#M14779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-in-a-python-unicode-string" title="https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-in-a-python-unicode-string" rel="nofollow noopener noreferrer" target="_blank"&gt;What is the best way to remove accents in a Python unicode string? - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oefe's response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;z &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; "áéíóúñ&lt;SPAN class="comment token"&gt;#/"  # ---- an example&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; unicodedata
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;strip_accents&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;c &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; c &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; unicodedata&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;normalize&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'NFD'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; unicodedata&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;category&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;c&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Mn'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                  

strip_accents&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;z&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# ---- example output&lt;/SPAN&gt;
'aeioun&lt;SPAN class="comment token"&gt;#/'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:39:27 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-12-11T09:39:27Z</dc:date>
    <item>
      <title>replace accented characters with the field calculator</title>
      <link>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191962#M14778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;I need to replace all the special characters in a field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;I am using the replace function, but it gives me an error&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;!Nombre_Cli! .replace("áéíóúñ#/,","aeioun&amp;nbsp;&amp;nbsp; ")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 23:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191962#M14778</guid>
      <dc:creator>RTMRTM</dc:creator>
      <dc:date>2020-05-15T23:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: replace accented characters with the field calculator</title>
      <link>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191963#M14779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-in-a-python-unicode-string" title="https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-in-a-python-unicode-string" rel="nofollow noopener noreferrer" target="_blank"&gt;What is the best way to remove accents in a Python unicode string? - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oefe's response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;z &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; "áéíóúñ&lt;SPAN class="comment token"&gt;#/"  # ---- an example&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; unicodedata
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;strip_accents&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;c &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; c &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; unicodedata&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;normalize&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'NFD'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; unicodedata&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;category&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;c&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Mn'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                  

strip_accents&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;z&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# ---- example output&lt;/SPAN&gt;
'aeioun&lt;SPAN class="comment token"&gt;#/'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191963#M14779</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-11T09:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: replace accented characters with the field calculator</title>
      <link>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191964#M14780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/401248"&gt;RTM RTM&lt;/A&gt;‌, it appears Dan's reply answered your question.&amp;nbsp; If so, please mark it correct to close out the question.&amp;nbsp; If not, what didn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 14:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-accented-characters-with-the-field/m-p/191964#M14780</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-05-19T14:11:14Z</dc:date>
    </item>
  </channel>
</rss>

