Taneem Ahmed writes:
> when I create text property using Xutf8TextListToTextProperty and commit it 
> to the client, the client doesn't recognize the utf8 encoding and treats it 
> as ascii-8.

The fourth argument to Xutf8TextListToTextProperty is the desired
encoding of the text property, i.e. the encoding in which the text is
transferred to the client. Even old traditional clients should cope
with COMPOUND_TEXT properties. So I'd try this:

  char* input = ...;
  XTextProperty textprop;

  if (Xutf8TextListToTextProperty(display, &input, 1, XCompoundTextStyle, &textprop) 
!= Success) {
    fprintf(stderr,"Xutf8TextListToTextProperty failed\n");
    return;
  }
  assert(textprop.format == 8);
  assert(textprop.encoding == XA_COMPOUND_TEXT);
  char* output = (char*) textprop.value;
  int output_len = textprop.nitems;

Bruno
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to