<?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>Question Re: SAP DataHub Pipeline Python 3.6 decode Error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaa-p/12112451#M4525340</link>
    <description>&lt;P&gt;There might be an error with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;result = "한글 출력 테스트"
result = result.decode('utf8')&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as you are trying to `decode` a string, while decode is applicable to bytes.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 08:57:25 GMT</pubDate>
    <dc:creator>Vitaliy-R</dc:creator>
    <dc:date>2020-01-09T08:57:25Z</dc:date>
    <item>
      <title>SAP DataHub Pipeline Python 3.6 decode Error</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaq-p/12112449</link>
      <description>&lt;P&gt;1. Operator&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1761459-pipeline-1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;2. Pipeline&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1761460-pipeline-2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;3. Result(Error)&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1761461-pipeline-3.png" /&gt;&lt;/P&gt;
  &lt;P&gt;4. Question&lt;/P&gt;
  &lt;P&gt;Why is there a decode error?&lt;BR /&gt;And what is the solution&lt;/P&gt;
  &lt;P&gt;Below is the code.&lt;BR /&gt;The question is simple.&lt;BR /&gt;How should I print out korean?&lt;BR /&gt;I've tried most of what Google has found, but I failed.&lt;/P&gt;
  &lt;P&gt;#code&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;#coding=utf-8
result = "한글 출력 테스트"
result = result.decode('utf8').encode('utf8')
api.send("outstr", result)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jan 2020 04:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaq-p/12112449</guid>
      <dc:creator>wjdwlgh888</dc:creator>
      <dc:date>2020-01-08T04:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAP DataHub Pipeline Python 3.6 decode Error</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaa-p/12112450#M4525339</link>
      <description>&lt;P&gt;As far as I know in Python3 all strings are already Unicode. So if I run simple&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;result = "한글 출력 테스트"
api.send("outstr", result)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1764493-2020-01-09-09-52-10.jpg" /&gt;&lt;/P&gt;&lt;P&gt;I am getting a result in Wiretap&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1764494-2020-01-09-09-53-48.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Here is a complete graph JSON, if you want to run the same:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
	"properties": {},
	"description": "Encode Korean",
	"processes": {
		"python3operator1": {
			"component": "com.sap.system.python3Operator",
			"metadata": {
				"label": "Python3Operator",
				"x": 12,
				"y": 12,
				"height": 80,
				"width": 120,
				"extensible": true,
				"config": {
					"script": "result = '한글 출력 테스트'\napi.send(\"outstr\", result)"
				},
				"additionaloutports": [
					{
						"name": "outstr",
						"type": "string"
					},
					{
						"name": "outblob",
						"type": "blob"
					}
				]
			}
		},
		"wiretap1": {
			"component": "com.sap.util.wiretap",
			"metadata": {
				"label": "Wiretap",
				"x": 196.99999904632568,
				"y": 12,
				"height": 80,
				"width": 120,
				"ui": "dynpath",
				"config": {}
			}
		}
	},
	"groups": [],
	"connections": [
		{
			"metadata": {
				"points": "136,43 163.99999952316284,43 163.99999952316284,52 191.99999904632568,52"
			},
			"src": {
				"port": "outstr",
				"process": "python3operator1"
			},
			"tgt": {
				"port": "in",
				"process": "wiretap1"
			}
		}
	],
	"inports": {},
	"outports": {}
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2020 08:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaa-p/12112450#M4525339</guid>
      <dc:creator>Vitaliy-R</dc:creator>
      <dc:date>2020-01-09T08:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAP DataHub Pipeline Python 3.6 decode Error</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaa-p/12112451#M4525340</link>
      <description>&lt;P&gt;There might be an error with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;result = "한글 출력 테스트"
result = result.decode('utf8')&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as you are trying to `decode` a string, while decode is applicable to bytes.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 08:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-datahub-pipeline-python-3-6-decode-error/qaa-p/12112451#M4525340</guid>
      <dc:creator>Vitaliy-R</dc:creator>
      <dc:date>2020-01-09T08:57:25Z</dc:date>
    </item>
  </channel>
</rss>

