If the programming language does not matter that much and you are looking for a precedure to encode MIC-E information, please refer to the APRS Specification document for details.
APRS Protocol Reference ver.1.0
Chapter 10 describes the procedure to encode and decode MIC-E information. This can be written in any programming language, which allows binary operations.
Please note that to encode MIC-E position AX.25 destination address is used.
Edited: Because you did not like my answer, below you can find what easily can be understood from the mentioned above specifications if you do a binary analysis of provided example:
MIC-E Destination Address:
"S32U6T" = 33 deg 25.64 min N, Western hemisphere, with longitude offset +0 degrees
with message: Standard 1/0/0 = M3: Returning
+------+------------------------------------------------------------------------
| byte | char Hex Bits Dig
| num | 7 654 3210
+------+------------------------------------------------------------------------
| 1 | S [53] [0 101 0011] 3
| 2 | 3 [33] [0 011 0011] 3
| 3 | 2 [32] [0 011 0010] 2
^ ^
| Digit [0...9]
Message Bit A, B, C
| 4 | U [55] [0 101 0101] 5
^
North
| 5 | 6 [36] [0 011 0110] 6
^
longitude offset +0 degrees
| 6 | T [54] [0 101 0100] 4
^
West
+-------------------------------------------------------------------------------