diff --git a/drivel.go b/drivel.go index 067aa7c..7ad2962 100644 --- a/drivel.go +++ b/drivel.go @@ -344,14 +344,15 @@ func splitStatus(status string) []string { words := strings.Split(status, " ") s := "" for _, word := range words { - if s == "" && len(word) <= CHARACTER_LIMIT { + asRunes := []rune(word) + if s == "" && len(asRunes) <= CHARACTER_LIMIT { s = word - } else if len(s)+1+len(word) <= CHARACTER_LIMIT { + } else if len(s)+1+len(asRunes) <= CHARACTER_LIMIT { s = s + " " + word } else { split = append(split, s) - bound := goutil.IntMin(len(word), CHARACTER_LIMIT) - s = string([]rune(word)[:bound]) + bound := goutil.IntMin(len(asRunes), CHARACTER_LIMIT) + s = string(asRunes[:bound]) } } if s != "" {