| 2885 | } |
| 2886 | |
| 2887 | static int |
| 2888 | xo_needed_encoding (xo_handle_t *xop) |
| 2889 | { |
| 2890 | if (XOF_ISSET(xop, XOF_UTF8)) /* Check the override flag */ |
| 2891 | return XF_ENC_UTF8; |
| 2892 | |
| 2893 | if (xo_style(xop) == XO_STYLE_TEXT) /* Text means locale */ |
| 2894 | return XF_ENC_LOCALE; |
| 2895 | |
| 2896 | return XF_ENC_UTF8; /* Otherwise, we love UTF-8 */ |
| 2897 | } |
| 2898 | |
| 2899 | static ssize_t |
| 2900 | xo_format_string (xo_handle_t *xop, xo_buffer_t *xbp, xo_xff_flags_t flags, |
no test coverage detected