Am 17.04.2017 um 10:26 schrieb aotto:
Am 15.04.2017 um 09:49 schrieb aotto:
select Reporter, Partner, Year, PartnerCode from [EXEC-BtH0] where Reporter = 'AGO'

Hi,

I add the following code in shell.c
        if( w<0 ){
          utf8_printf(p->out,"%*.*s%s",-w,-w,
              azArg[i] ? azArg[i] : p->nullValue,
              i==nArg-1 ? rowSep : "  ");
        }else{
          utf8_printf(p->out,"%-*.*s%s",w,w,
              azArg[i] ? azArg[i] : p->nullValue,
              i==nArg-1 ? rowSep : "  ");
printC(azArg[i])
        }
using "printC" (this is a macro end op with…
→ #define printC(var)     MVP(MQ_FORMAT_C,var)
> #define MVP(f,v) fprintf(MQ_OUT,"%s(%s:%d:%d) -> %p:" #v "<" f ">\n", __func__, __FILE__, __LINE__, mq_getpid(), \
              v,v);fflush(MQ_OUT);
→#define MQ_OUT p->out
→ is is just a "fprintf"…

I get the following lines…

AGO         shell_callback(shell.c:1094:1) -> 0xa0b9c0:azArg[i]<AGO>
AUT         shell_callback(shell.c:1094:1) -> 0x9e7f88:azArg[i]<AUT>
2000        shell_callback(shell.c:1094:1) -> 0x5a9de78:azArg[i]<2000>
EO EU WE 342202
shell_callback(shell.c:1094:1) -> 0x9e7fab:azArg[i]<EO EU WE €O $H>
AGO         shell_callback(shell.c:1094:1) -> 0xa0b9c0:azArg[i]<AGO>
AUT         shell_callback(shell.c:1094:1) -> 0x9e7f88:azArg[i]<AUT>
2001        shell_callback(shell.c:1094:1) -> 0x5a9de78:azArg[i]<2001>
EO EU WE 342202
shell_callback(shell.c:1094:1) -> 0x9e7fab:azArg[i]<EO EU WE €O $H>

summary: the default "fprintf" write the right "€" sign and the sqlite "utf8_printf"
seems to do something wrong.


mfg ao.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


additional info… this is the code AFTER preprocessing…

      for(i=0; i<nArg; i++){
        int w;
        if( i<(int)(sizeof(p->actualWidth)/sizeof(p->actualWidth[0])) ){
           w = p->actualWidth[i];
        }else{
           w = 10;
        }
        if( p->cMode==9 && azArg[i] && strlen30(azArg[i])>w ){
          w = strlen30(azArg[i]);
        }
        if( i==1 && p->aiIndent && p->pStmt ){
          if( p->iIndent<p->nIndent ){
            fprintf(p->out, "%*.s", p->aiIndent[p->iIndent], "");
          }
          p->iIndent++;
        }
        if( w<0 ){
          fprintf(p->out,"%*.*s%s",-w,-w,
              azArg[i] ? azArg[i] : p->nullValue,
              i==nArg-1 ? rowSep : "  ");
        }else{
          fprintf(p->out,"%-*.*s%s",w,w,
              azArg[i] ? azArg[i] : p->nullValue,
              i==nArg-1 ? rowSep : "  ");
fprintf(p->out,"%s(%s:%d:%d) -> %p:" "azArg[i]" "<" "%s" ">\n", __func__, "shell.c", 1094, 1, azArg[i],azArg[i]);fflush(p->out);
        }
      }

mfg a.o

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to