Le 2012-06-20 à 04:49, Александр Орефков <[email protected]> a écrit :
> Hi.
> I temporary use simple crutch in diff.c in sbsWriteText:
> ...
> }else if( c=='>' && p->escHtml ){
> memcpy(&z[j], ">", 4);
> j += 4;
> }else{
> z[j++] = c;
> /*fix for russian utf-8 - 2 bytes per symbol*/
> if( c<0 ) {
> z[j++] = zIn[++i];
> }
> }
>
> It worked. At least for Russian
Good.. I got same problem with Chinese. But since UTF8 can have from 1 to 6
bytes, it will not work in all the case.
http://en.wikipedia.org/w/index.php?title=UTF-8
So your "if(c<0)..." Could be a while loop which would need some protection to
don't overflow the input buffer.
Regards
--
Martin G.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users