title: How to handle the network message with unicode that is not decodeable to utf-8
body: <p>I receive the following byte message via  socket connection and  I want to convert into string and do further processing I am using python3.7</p>
  
  <p>below is the code i tried so far </p>
  
  <pre><code>import  codecs
  
  a = b'0400F224648188E0801200000040000000001941678904000010237890000000000000222220418151856038556051259950760020806002468060046010403319     HSBCBSB8001101234567890MC   100  WITH ORDERIN   FO           AU009006Q\x00\x00\x00\x83\x00007\xa0\x00\x00\x00\x00%\x02010003855604181518562468000000000460100000'
  
  b= codecs.decode(a, 'utf-8')
  
  print(b)
  </code></pre>
  
  <p>Iam getting the error as below </p>
  
  <pre><code>&gt; UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position    &gt; 208: invalid start byte
  </code></pre>
  
  <p>how can I convert the data to string and process further </p>
  
  <p>Thanks in advance</p>