UCS2 code (80,81,82 coding) in SIM card

In the SIM card phone book file (6F3A), the alpha information sometimes needs to code as UCS2, for example to input the Chinese characters or Thai characters, the detail of how to code in UCS2 can be found in GSM11.11, in the part of “Annex B (normative):Coding of Alpha fields in the SIM for UCS2”, can go there to get all the detail, here just give some examples, example 1, code 81, Thai: “ผีๆ” in code 81 Unicode of “ผีๆ” is as 0E1C0E350E46, as unicode are two bytes for one character, so the length of the 81 coding is 03, the base pointer is 0x0E00, calculate the Octet 2, get the bits 15 to 8 of the base pointer, it’s 00011100, means 0x1C, to make it simple, left shift one bit of 0x0E, it’s 0x1C,  the offset value to 0x0E00 of the three characters are 0x1C, 0x35, 0x46,  put the bit 8 as