On Fri, Nov 29, 2002 at 04:20:12PM -0800, Nadim Shaikli wrote:
> --- Olivier Chapuis <[EMAIL PROTECTED]> wrote:
> > On Sun, Nov 24, 2002 at 12:49:35PM -0800, Nadim Shaikli wrote:
> > >
> > > I do have a possible idea of what is happening.  Mikhael/Olivier, this
> > > might make sense to you guys more than others :-) so let me know if you
> > > want further detail off the list.  I added a continuous assignment to a
> > > Form-B glyph right above the first '#if 0' in the FBidiJoin.c file (say
> > > to 0xFED3) and that failed.  Which leads me to believe that unicode
> > > conversion within fvwm is failing (this would also explain why the same
> > > code doesn't fail outside fvwm).  Does this make sense or ring any
> > > bells ?  In other words, a glyph value of 0x0641 is fine where as 0xFED3
> > > seems to trigger memory stomping - the difference there is how UTF-8 is
> > > represnted and converted (are all UTF-8's within fvwm represented as
> > > 4-bytes since that could be the max size ? The difference in the example
> > > noted above it 2-bytes vs. 3-bytes).  Am I barking up the wrong tree :-) ?
> > 
> > Maybe not. fvwm makes some UTF-8 conversions (others are done by
> > iconv). I am not sure that these conversions are safe in certain
> > case. I should take a look.
> 
> Olivier, 'FlocaleUtf8ToUnicodeStr2b' in libs/Flocale.c (lines 160-192)
> looks rather suspect since it assumes all resultant unicode bytes will
> occupy 2 bytes; am I reading that correctly ?  I tried man'ing the
> various Xlib functions and got overwhelmed.  You might want to take a
> peek at vim-6.1+ (vim.sf.net - note mbyte.c, function = utf_ptr2char).
>

Yes, this function is suspect. It converts (char *)UTF-8 into
(XChar2b *)USC-2. It is used under this situation only when the
user uses an iso10646-1 font and does not use an UTF-8 locale.

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to