- static gchar buf[255];
- GError *err = NULL;
- gchar *text = g_locale_to_utf8(s, fp->w, 0, 0, &err);
- if ( !err )
- {
- g_snprintf(buf, 255, text);
- g_free(text);
- }
- else
- {
- g_warning("Cannot convert string \"%s\" to utf-8: %s\n", s, err->message);
- g_error_free(err);
- return NULL;
- }
+ g_assert(fp->w == s->len);
+
+ /* Converts binary value V into printable form in the exactly
+ FP->W character in buffer S according to format specification
+ FP. No null terminator is appended to the buffer. */
+ data_out (s->str, fp, v);