# Convert cyrillic to PDU modem format for sending SMS

**URL:** <https://forum.mikrotik.com/t/convert-cyrillic-to-pdu-modem-format-for-sending-sms/167891>\
**Category:** Scripting\
**Created:** [July 7, 2023, 9:47am UTC](https://forum.mikrotik.com/t/convert-cyrillic-to-pdu-modem-format-for-sending-sms/167891 "2023-07-07T09:47:52Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![rextended](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/rextended/32/67729_2.png) [@rextended](https://forum.mikrotik.com/u/rextended)\
**Post date:** [July 14, 2023, 6:11pm UTC](https://forum.mikrotik.com/t/convert-cyrillic-to-pdu-modem-format-for-sending-sms/167891/14 "2023-07-14T18:11:20Z")

</div>

The new function I write ASCIItoCP1251toUNICODE can be used to convert Cyrillic CP1251 to UNICODE / UTF-2 for PDU, just remove 0x and the last space on  
:local unicode "0x$($CP1251toUNICODE-\>[:find $ascii [:pick $string $pos ($pos + 1)] -1]) "  
for obtain  
тест = \F2\E5\F1\F2 = 0442043504410442  
[http://forum.mikrotik.com/t/rextended-fragments-of-snippets/151033/1](http://forum.mikrotik.com/t/rextended-fragments-of-snippets/151033/1)

---

_[View the full topic](https://forum.mikrotik.com/t/convert-cyrillic-to-pdu-modem-format-for-sending-sms/167891)._
