[rrd-users] rrdxport change xml encoding

Yannick Marquet itcsoft54 at yahoo.fr
Wed Jul 17 09:01:57 CEST 2013


Hello,

I belive it's not possible without recompile rrdtool :

 From source code (1.4.7) :

rrd_xport.h:
#define XML_ENCODING     "ISO-8859-1"

rrd_tool.c:
       if (rrd_xport
             (argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt,
              &legend_v, &data) == 0) {
             char *old_locale = setlocale(LC_NUMERIC,NULL);
             setlocale(LC_NUMERIC, "C");
             row_cnt = (end - start) / step;
             ptr = data;
             if (json == 0){
                 printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n\n",
                     XML_ENCODING);
                 printf("<%s>\n", ROOT_TAG);
                 printf("  <%s>\n", META_TAG);
             }
             else {
                 printf("{ about: 'RRDtool xport JSON output',\n meta: 
{\n");
             }

Yannick


Le 15/07/2013 16:42, Sipter Bálint a écrit :
> Hi.
> Is it possible to change the default ISO-8859-1 encoding to utf-8 in 
> the xported xml? I can't seem to find any information about this. I 
> can change it manually, but it would be great if I could do it with 
> the xport command.
>
> Thank you!
>
> Regards,
> Bálint
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130717/2135db76/attachment.htm 


More information about the rrd-users mailing list