How to correctly convert the bytes type devicetoken obtained from the MDM description file to the 16-bit hexadecimal data required by APNS?

I have converted a large part of the data, but only 5% of the data was successfully converted. The failed devicetoken shows "bad devicetoken" when accessing APNS. Here are examples of failed conversions devicetoken. Is there any official documentation for this part?

DeviceToken Orgin \xc2\xa1\xcb\x9cr\xc3\x81\xe2\x80\x9e\x01b\xc3\xbce1pf\t\xc2\xa7\xc3\x82v}\xc3\xa1\xc3\x9a:?\r\n\xc3\xa5\xc6\x92\xc3\xb7y\xc3\x9e\xe2\x80\x9c\xc3\x89r

How to correctly convert the bytes type devicetoken obtained from the MDM description file to the 16-bit hexadecimal data required by APNS?
 
 
Q