2012/6/20 Martin Gagnon <[email protected]>:
> 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], "&gt;", 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.

Its a temp crutch.
I hope, DRH make all excelent :)

WBR, Alexander Orefkov.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to