[FriBidi] Obsolete fribidi_log2vis

Shachar Shemesh shachar at shemesh.biz
Tue Jun 23 07:40:03 PDT 2009


أحمد المحمودي wrote:
> Hello,
>
> On Mon, Jun 22, 2009 at 03:34:41PM -0400, Behdad Esfahbod wrote:
>   
>> You are not allocating enough for outstr which is UTF8.  Try
>> allocating 4 bytes per character. That is, (size * 4).
>>     
>
>   Thanks, but please notice that instr is also UTF8, and although it 
>   consists of 13 characters, yet its size, as returned by sizeof(instr), 
>   is 26 !
>
>   Anyways I tried your method, yet I still get the problem I mentioned 
>   with: 
>
>   base = FRIBIDI_PAR_RTL;
>
>   That is printf(outstr); shows nothing !
>
>   
>> Also, "sizeof(us)" doesn't return what you meant.
>>     
>
>   Yes, I noticed that it returns the size of pointer type. Well, what I 
>   need is to know the size of the string after log2vis, because for 
>   example if I got the 2 characters ل & ا after each other, they get 
>   translated to a single character, hence the string size decreases. So 
>   how do I get the resulting string size ?
>
>   
Are you looking for the string size in characters or in bytes?

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/fribidi/attachments/20090623/725623c3/attachment.html 


More information about the fribidi mailing list