Results 1 to 15 of 153

Thread: router2sms [python]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Quote Originally Posted by xz_kostyan View Post
    Code:
    export LANG='ru_RU.UTF-8'
    после перезагрузки роутера строка пропадает

    flashfs save && flashfs commit && flashfs enable && reboot
    делал

    где копать?

    сам нашел =)

    надо править
    /tmp/local/root/.profile



    и все так и русские буквы не шлет
    Code:
    [admin@wl500g root]$ /opt/etc/sms_py/send.py 7987###### test
    Sms sent
    
    [admin@wl500g root]$ /opt/etc/sms_py/send.py 7987###### test тест
    Traceback (most recent call last):
      File "/opt/etc/sms_py/send.py", line 27, in <module>
        print(s.send_sms(phone, message))
      File "/opt/etc/sms_py/sender.py", line 161, in send_sms
        is_long = len(message) != len(bytes(message, 'UTF-8'))
    UnicodeEncodeError: 'utf-8' codec can't encode character '\udcd1' in position 5: surrogates not allowed
    [admin@wl500g root]$
    Last edited by karim; 07-03-2010 at 18:28. Reason: сам нашел =)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •