From: Stefano Zacchiroli Date: Thu, 23 Feb 2006 22:30:23 +0000 (+0000) Subject: bugfix: use utf8-aware substring function X-Git-Tag: 0.4.95@7852~1623 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=895d99fd68f7f4938e9feee68e75d8c896dbe0e0;p=helm.git bugfix: use utf8-aware substring function --- diff --git a/components/grafite_parser/grafiteWalker.ml b/components/grafite_parser/grafiteWalker.ml index eb2eb22a5..742532113 100644 --- a/components/grafite_parser/grafiteWalker.ml +++ b/components/grafite_parser/grafiteWalker.ml @@ -51,7 +51,8 @@ let grep_statement ?(status = LexiconEngine.initial_status) ?(callback = ignore) | Some (status, stm) when test stm -> (* "interesting" statement *) let loc_begin, loc_end = HExtlib.loc_of_floc (get_loc stm) in let raw_statement = - String.sub content loc_begin (loc_end - loc_begin) in + Netconversion.ustring_sub `Enc_utf8 loc_begin (loc_end - loc_begin) + content in callback raw_statement; exaust (raw_statement :: acc) status | Some (status, _stm) -> exaust acc status in