anchor.diff:            writeln('not a key event ');
           end;
       end;
  -    length := XLookupString(@event, @s[1], 9, @keysym, @compose_status);
  +    // length := XLookupString(@event, @s[1], 9, @keysym, @compose_status);
  +    length := Xutf8LookupString(InputContext, @event.xkey, @s[1], 9, @keysym, @compose_status);
       SetLength(s, length);
       if((length > 0) and (length <=9)) then
         writeln('result of xlookupstring [' + s + ']');
  
positive.code:             // Maybe in the future we can switch to XmbLookupString again.
              if (ev.xkey.state and (ControlMask or Mod1Mask)) = 0 then
              begin
                for i := 1 to Length(FComposeBuffer) do
                begin
                  msgp.keyboard.keychar := FComposeBuffer[i];
                  fpgPostMessage(nil, w, FPGM_KEYCHAR, msgp);
                end;
              end;
  
negative.code: function TfpgApplicationImpl.StartComposing(const Event: TXEvent): TKeySym;
  begin
    SetLength(FComposeBuffer,
      // XLookupString(@Event, @FComposeBuffer[1],    
      Xutf8LookupString(InputContext, @Event.xkey, @FComposeBuffer[1],
        SizeOf(FComposeBuffer) - 1, @Result, @FComposeStatus));
  end;
  
  