dbTalk Databases Forums  

Re: [BUGS] dbf2pg international characters handling incomplete

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] dbf2pg international characters handling incomplete in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] dbf2pg international characters handling incomplete - 09-27-2003 , 05:26 PM






--ELM1064701510-4162-0_
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UNKNOWN-8BIT


OK, patch attached and applied for 7.4. Thanks.

---------------------------------------------------------------------------

Márcio Dick Smiderle wrote:
Quote:
Your name: M?rcio Dick Smiderle
Your email address: dick (AT) inf (DOT) ufsc.br


System Configuration
---------------------
Architecture : k62 300

Operating System : Linux 2.4.21 elf

PostgreSQL version : PostgreSQL-7.2.1 and CVS(just dbf2pg)

Compiler used : gcc-3.3 and gcc-2.95


Please enter a FULL description of your problem:
------------------------------------------------

dbf2pg interprets international chars (????? etc) as end of record
cell text.


Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

Run dbf2pg with some records with non-ascii chars.


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

In the main() of dbf2pg add the line

setlocale(LC_ALL, ""); /* For isprint() to work correctly with other
charsets than 7 bit ascii */



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

--ELM1064701510-4162-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
Content-Disposition: inline; filename="/bjm/diff"

Index: contrib/dbase/dbf2pg.c
================================================== =================
RCS file: /cvsroot/pgsql-server/contrib/dbase/dbf2pg.c,v
retrieving revision 1.18
diff -c -c -r1.18 dbf2pg.c
*** contrib/dbase/dbf2pg.c 8 Aug 2003 20:20:49 -0000 1.18
--- contrib/dbase/dbf2pg.c 27 Sep 2003 22:24:02 -0000
***************
*** 700,705 ****
--- 700,707 ----
if (verbose > 1)
printf("Opening dbf-file\n");

+ setlocale(LC_ALL, ""); /* fix for isprint() */
+
if ((dbh = dbf_open(argv[0], O_RDONLY)) == (dbhead *) - 1)
{
fprintf(stderr, "Couldn't open xbase-file %s\n", argv[0]);

--ELM1064701510-4162-0_
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

--ELM1064701510-4162-0_--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.