Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
>>Please review, any comments are welcome.

>This looks wrong:

>          if (String.width(msg) > 8)
>            msg = string_to_utf8(msg);

>You are always utf8-decoding the string, so you should always
>utf8-encode them.

Well spotted.  I think I need to change the width check into a character-range
check.  If there no characters values >127, then I can skip the encoding
step (only).  I'll fix it in my development version.
-- 
Stephen.
  • Cle... Stephen R. van den Berg
    • ... Stephen R. van den Berg
    • ... Martin Karlgren
      • ... Stephen R. van den Berg
    • ... Martin Nilsson (Coppermist) @ Pike (-) developers forum
      • ... Stephen R. van den Berg
        • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
          • ... Stephen R. van den Berg
            • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
        • ... Chris Angelico
          • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
            • ... Mirar @ Pike developers forum
          • ... Chris Angelico
            • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
            • ... Chris Angelico
              • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum

Reply via email to