Thanks! It works! On Tue, Aug 10, 2010 at 3:16 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Edje: Fixed edje_object_part_text_cursor_content_get to handle non-english. > Thanks to Brian Wang for reporting. > Author: tasn > Date: 2010-08-10 00:16:45 -0700 (Tue, 10 Aug 2010) > New Revision: 50953 > > Modified: > trunk/edje/src/lib/edje_entry.c > > Modified: trunk/edje/src/lib/edje_entry.c > =================================================================== > --- trunk/edje/src/lib/edje_entry.c 2010-08-10 03:37:21 UTC (rev 50952) > +++ trunk/edje/src/lib/edje_entry.c 2010-08-10 07:16:45 UTC (rev 50953) > @@ -2437,16 +2437,21 @@ > Evas_Textblock_Cursor *c = _cursor_get(rp, cur); > const char *s; > static char buf[16]; > - int pos, pos2, ch; > + int pos, pos2, i; > if (!c) return NULL; > s = > evas_textblock_node_format_text_get(evas_textblock_cursor_format_get(c)); > if (s) return s; > s = evas_textblock_cursor_paragraph_text_get(c); > if (!s) return NULL; > pos = evas_textblock_cursor_pos_get(c); > - pos2 = evas_string_char_next_get(s, pos, &ch); > - strncpy(buf, s + pos, pos2 - pos); > - buf[pos2 - pos] = 0; > + /* Get the actual utf8 pos */ > + for (i = 0 ; pos > 0 ; pos--) > + { > + i = evas_string_char_next_get(s, i, NULL); > + } > + pos2 = evas_string_char_next_get(s, i, NULL); > + strncpy(buf, s + i, pos2 - i); > + buf[pos2 - i] = 0; > return buf; > } > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >
-- brian ------------------ Cool-Karaoke - The smallest recording studio, in your palm, open-sourced http://cool-idea.com.tw/ iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel