How to convert "\uxxxx\uxxxx" to u'\Uxxxxxxxx'?
<p>I have a text file who is filled with unicode characters as <code>"\ud83d\udca5"</code> but python don't seem to like them.<br>
But if I replace it by <code>u'\U0001f4a5'</code> which seems to be his python escape style (<a href="http://www.charbase.com/1f4a5-unicode-collision-symbol" rel="nofollow">Charbase</a>), it works.</p>

<p>Is there a solution to convert them all into the <code>u"\Uxxxxxxxx"</code> escape format than python can understand ?</p>

<p>Thanks.</p>