@@ -211,8 +211,9 @@ impl ChangeSet {
211211 pos += n;
212212 }
213213 Insert(s) => {
214− changes.push(Delete(s.len()));
215− len += s.len();
214+ let chars = s.chars().count();
215+ changes.push(Delete(chars));
216+ len += chars;
216217 }
217218 }
218219 }
@@ -240,7 +241,7 @@ impl ChangeSet {
240241 }
241242 Insert(s) => {
242243 text.insert(pos, s);
243− pos += s.len();
244+ pos += s.chars().count();
244245 }
245246 }
246247 }
@@ -497,7 +498,7 @@ mod test {
497498 len: 12,
498499 };
499500
500− let doc = Rope::from("123 hello xz");
501+ let doc = Rope::from("世界3 hello xz");
501502 let revert = changes.invert(&doc);
502503
503504 let mut doc2 = doc.clone();