- coding.composing = COMPOSITION_DISABLED;
- truelen = get_clipboard_data (CF_OEMTEXT, htext, data_size, 1);
- bufsize = decoding_buffer_size (&coding, truelen);
- buf = (unsigned char *) xmalloc (bufsize);
- decode_coding (&coding, htext, buf, truelen, bufsize);
- ret = make_string_from_bytes ((char *) buf,
- coding.produced_char, coding.produced);
- xfree (buf);
- if (SYMBOLP (coding.post_read_conversion)
- && !NILP (Ffboundp (coding.post_read_conversion)))
- ret = run_pre_post_conversion_on_str (ret, &coding, 0);
- Vlast_coding_system_used = coding.symbol;
+ coding.mode &= CODING_ANNOTATION_MASK;
+ decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt);
+ ret = coding.dst_object;
+ Vlast_coding_system_used = CODING_ID_NAME (coding.id);