pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14211: i am enable to upload .xlsx file in my postgres database.
2+ messages / 2 participants
[nested] [flat]

* BUG #14211: i am enable to upload .xlsx file in my postgres database.
@ 2016-06-23 16:56 zzia88@gmail.com
  2016-06-23 17:54 ` Re: BUG #14211: i am enable to upload .xlsx file in my postgres database. David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: zzia88@gmail.com @ 2016-06-23 16:56 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14211
Logged by:          Zubair Alam
Email address:      zzia88@gmail.com
PostgreSQL version: 9.5.3
Operating system:   windows7-x64(64 bit)
Description:        

copy person(first_name,last_name,dob,email) from 'D:\person\person.xlsx'
with delimiter ',' csv header encoding 'WIN1256';

my client client_encoding is:- UNICODE
 i am running this code on my host machine

At the runtime i am getting this error:-ERROR:  invalid byte sequence for
encoding "WIN1256": 0x00
CONTEXT:  COPY person, line 1

if i am providing csv header encoding :-'UNICODE(UTF8) then i am getting
this error:-ERROR:  invalid byte sequence for encoding "UTF8": 0x00
CONTEXT:  COPY person, line 1

********** Error **********

ERROR: invalid byte sequence for encoding "UTF8": 0x00
SQL state: 22021
Context: COPY person, line 1


Please solve this problem as soon as possible and test that code then
provide me that code or solution.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14211: i am enable to upload .xlsx file in my postgres database.
  2016-06-23 16:56 BUG #14211: i am enable to upload .xlsx file in my postgres database. zzia88@gmail.com
@ 2016-06-23 17:54 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2016-06-23 17:54 UTC (permalink / raw)
  To: zubair alam <zzia88@gmail.com>; +Cc: pgsql-bugs

On Thu, Jun 23, 2016 at 12:56 PM, <zzia88@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14211
> Logged by:          Zubair Alam
> Email address:      zzia88@gmail.com
> PostgreSQL version: 9.5.3
> Operating system:   windows7-x64(64 bit)
> Description:
>
> copy person(first_name,last_name,dob,email) from 'D:\person\person.xlsx'
> with delimiter ',' csv header encoding 'WIN1256';
>
> my client client_encoding is:- UNICODE
>  i am running this code on my host machine
>
> At the runtime i am getting this error:-ERROR:  invalid byte sequence for
> encoding "WIN1256": 0x00
> CONTEXT:  COPY person, line 1
>
> if i am providing csv header encoding :-'UNICODE(UTF8) then i am getting
> this error:-ERROR:  invalid byte sequence for encoding "UTF8": 0x00
> CONTEXT:  COPY person, line 1
>
> ********** Error **********
>
> ERROR: invalid byte sequence for encoding "UTF8": 0x00
> SQL state: 22021
> Context: COPY person, line 1
>
>
> Please solve this problem as soon as possible and test that code then
> provide me that code or solution.
>
>
​Not a bug.

Native Excel files are not CSV formatted.  Attempting to import them as-is
via copy will not work.  You need to get the Excel data into a format that
PostgreSQL can digest.  For simple cases performing a "Save As" and
changing the file type to CSV will work.​

David J.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-06-23 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23 16:56 BUG #14211: i am enable to upload .xlsx file in my postgres database. zzia88@gmail.com
2016-06-23 17:54 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox