Encoding for OrientDB (can't send a literal string)
<p>I have the next problem. I need to create a vertex with a propertyA with a value 'Ø§ÙÙØ³Ø§Ø¡'. The problem is from python, python CAN'T send the string 'Ø§ÙÙØ³Ø§Ø¡' so...</p>

<p>I know I need to do a encode, like the next:</p>

<pre><code>&gt;&gt;&gt;a = 'Ø§ÙÙØ³Ø§Ø¡'
&gt;&gt;&gt;b = a.encode('cp270')
&gt;&gt;&gt;print b
&gt;&gt;&gt;'\x9f\xe9\xea\xab\x9f\x98'
</code></pre>

<p>But with this encode OrientDB won't work. I think that I need an ascii encode. </p>

<p>There is the problem (without response):
<a href="https://github.com/orientechnologies/orientdb/issues/5860" rel="nofollow">https://github.com/orientechnologies/orientdb/issues/5860</a></p>

<p>Anyone that know about OrientDB can help me? Thank in advance!</p>

<p>Using python I can do this:</p>

<pre><code>&gt;&gt;&gt; a = 'ØºØ±ÙØ¨Ø¯ÙØ§ÙÙ#ÙØ®ÙØ³Ø©Ø§ÙØ¹Ø²'
&gt;&gt;&gt; type(a)
&lt;type 'str'&gt;
&gt;&gt;&gt; b = a.decode('utf8')
&gt;&gt;&gt; b
u'\u063a\u0631\u064a\u0628\u062f\u064a\u0627\u0644\u0649#\u0645\u062e\u064a\u0633\u0629\u0627\u0644\u0639\u0632'
&gt;&gt;&gt; print b
ØºØ±ÙØ¨Ø¯ÙØ§ÙÙ#ÙØ®ÙØ³Ø©Ø§ÙØ¹Ø²
</code></pre>

<p>So, if I put a query like the next will create a vertex with the next result:</p>

<pre><code>query = 'create vertex v content {"property":"%s"}' %b
</code></pre>

<p><a href="http://i.stack.imgur.com/JOZXt.png" rel="nofollow"><img src="http://i.stack.imgur.com/JOZXt.png" alt="enter image description here"></a></p>

python character-encoding orientdb