offset now works correct, by replacing #pos to #charpos in source.rb:41

thats all ;)

charpos pos counts multibyte (nonASCII) chars as one,
offset works now fine