You can try https://github.com/SirVer/ultisnips/blob/master/plugin/UltiSnips/compatibility.py#L79

~~~~~~
from UltiSnips.compatibility import as_unicode  # in a global
`!p snip.rv = len(as_unicode(t[1]))*'#'`
~~~~~~~~

same comment for all usage of rst_char_len