Hi folks.

I suppose, that Bruse was busy to answer on my last mail on this topic.
But I love, when something work rather then it do not :)

What do you think about this little patch?

Sorry if i put this msg into wrong list, but i didn't find
more appropriate for this contrib. I will be appreciate if
you put me into right one.

Thanks,
 Andriy.

http://www.imt.com.ua

---------- Forwarded message ----------

The code above skips anything but chars between 0x21 and 0x7E.
My dbf have cyrillic charset, so any filds, that doesn't end on "." (dot)
are truncated. Moreover "chars between 0x21 and 0x7E" means, that
dbf2pg is not working for not ascii charset unless string ends on
some ascii symbol, usually punctuation.

What else than isspace one must skip (trim) in 'C' (char) field in dbf?

On Thu, 24 Jul 2003, Bruce Momjian wrote:

>
> Can we assume anything in that range is a space?  There must be a better
> way.
>
>
> ---------------------------------------------------------------------------
>
> Andriy Tkachuk wrote:
> > Bruse, what about this:
> >
> > Index: contrib/dbase/dbf.c
> > ===================================================================
> > RCS file: /projects/cvsroot/pgsql-server/contrib/dbase/dbf.c,v
> > retrieving revision 1.5
> > diff -r1.5 dbf.c
> > 337c337
> > <                       while ((i > 0) && ((*end < 0x21) || (*end > 0x7E)))
> > ---
> > >                       while ((i > 0) && isspace(*end))
> >
> > it fixes an bug for me with cyrillic conversion.
> >
> > Thanks,
> >     Andriy.
> >
> >
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   [EMAIL PROTECTED]               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
>

--
  Because strait is the gate, and narrow is the way, which leadeth unto
   life, and few there be that find it. (MAT 7:14)
  Ask, and it shall be given you; seek, and ye shall find;
   knock, and it shall be opened unto you... (MAT 7:7)

ANT17-RIPE



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to