<?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: Problem on unicode fonts in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-on-unicode-fonts/m-p/76413#M6199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out Dan Patterson's answer to this question yesterday:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A href="https://community.esri.com/thread/149400"&gt;ascii codec can't encode character u'\xe1' in position 6: ordinal not in range(128)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's effectively the same issue -- you'll need to &lt;A href="https://www.python.org/dev/peps/pep-0263/"&gt;declare the file encoding&lt;/A&gt; as UTF-8 (or something else that includes Sinhalese within its encoding set), and then tell Python that the strings you're encoding are Unicode by prefixing them with u"", e.g.:&lt;/P&gt;&lt;P&gt;&amp;nbsp; str1 = u"මාතා"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2015 19:55:08 GMT</pubDate>
    <dc:creator>ShaunWalbridge</dc:creator>
    <dc:date>2015-04-21T19:55:08Z</dc:date>
    <item>
      <title>Problem on unicode fonts</title>
      <link>https://community.esri.com/t5/python-questions/problem-on-unicode-fonts/m-p/76412#M6198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear sir!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use unicode "SINHALA" (Our local fonts) in Python, It gives me following message&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; str1 = "මාතා"&lt;/P&gt;&lt;P&gt;Unsupported characters in input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solve this Problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Padmasiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 10:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-on-unicode-fonts/m-p/76412#M6198</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2015-04-21T10:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on unicode fonts</title>
      <link>https://community.esri.com/t5/python-questions/problem-on-unicode-fonts/m-p/76413#M6199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out Dan Patterson's answer to this question yesterday:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A href="https://community.esri.com/thread/149400"&gt;ascii codec can't encode character u'\xe1' in position 6: ordinal not in range(128)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's effectively the same issue -- you'll need to &lt;A href="https://www.python.org/dev/peps/pep-0263/"&gt;declare the file encoding&lt;/A&gt; as UTF-8 (or something else that includes Sinhalese within its encoding set), and then tell Python that the strings you're encoding are Unicode by prefixing them with u"", e.g.:&lt;/P&gt;&lt;P&gt;&amp;nbsp; str1 = u"මාතා"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 19:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-on-unicode-fonts/m-p/76413#M6199</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2015-04-21T19:55:08Z</dc:date>
    </item>
  </channel>
</rss>

