File Read Error (Autodetect - Unicode (UTF-8))

4,539 views
Skip to first unread message

Ryan O'Donnell

unread,
Jul 24, 2013, 5:46:51 PM7/24/13
to seque...@googlegroups.com
I often get the following error when uploading a .csv file to SequelPro:
File Read Error 
An error occurred when reading the file, as it could not be read using the encoding you selected (Autodetect - Unicode (UTF-8)). 
Only 9900 rows were imported.
Obviously the 9,900 rows is just specific to the file I'm importing currently, but I get this error a lot -- especially when I download them from the online database I use. It seems like there's normally a problem probably because there's potentially non-english characters in the large datasets I export. The server's likely on Windows and I use Mac OS X (along with Sequel Pro 1.0.2).

Is there any easy way to fix this?

Thanks! 

Rowan Beentje

unread,
Jul 24, 2013, 5:55:47 PM7/24/13
to seque...@googlegroups.com
Hi Ryan,

To try and detect the encoding of files you select in the Import dialog, we use an encoding detection library which scans the first 250-500k of the file and uses heuristics to try and work out the most likely encoding. However, bytes are bytes - there's no way of knowing for sure, and it sounds like it's getting it wrong!

When you download them from your other database, do you specify an encoding for the export?

On the file Import selection dialog, you can specify the encoding to use when importing. You could try another likely encoding (Western - Windows Latin 1 - maybe?) and see if that helps.

The other alternative is that there is actually a bug in the CSV import routine, of course! If you can open up the file in another editor and extract rows just 9900 to 10000, you may be able to pinpoint the row in question, and so see if there's an obvious encoding for the file or characters causing a problem.

Hope that helps,
Rowan
> --
> You received this message because you are subscribed to the Google Groups "Sequel Pro" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sequel-pro+...@googlegroups.com.
> To post to this group, send email to seque...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sequel-pro.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ryan O'Donnell

unread,
Jul 24, 2013, 6:01:03 PM7/24/13
to seque...@googlegroups.com
Thanks, Rowan! I unfortunately can't select the way the database spits out the files and I'm not exactly sure what it's using. But I'd definitely be down to try switching the encoding to "Western - Windows Latin 1" -- I thought it would be using the "i" next to naming the table while importing in table encoding, but that doesn't seem to be right, as "Western - Windows Latin 1" isn't an option. Where would I try that? Thanks again!

Rowan Beentje

unread,
Jul 24, 2013, 6:05:47 PM7/24/13
to seque...@googlegroups.com
Ryan,

The encoding used to read the file can be set in the initial file selection dialog. When you first go to the "Import..." menu item, the Open dialog has a number of options below the file area, including an Encoding dropdown.

(If you are creating a new table for the import, you probably do also want to select the same encoding in the "i" dialog, as you mentioned!)

Rowan

Ryan O'Donnell

unread,
Jul 24, 2013, 6:08:28 PM7/24/13
to seque...@googlegroups.com
Seems like Western Windows Latin 1 did it! Thanks so much again!
>You received this message because you are subscribed to a topic in the
>Google Groups "Sequel Pro" group.
>To unsubscribe from this topic, visit
>https://groups.google.com/d/topic/sequel-pro/iplyvChZdgI/unsubscribe.
>To unsubscribe from this group and all its topics, send an email to

Josh Jacobson

unread,
Nov 29, 2016, 6:22:15 AM11/29/16
to Sequel Pro
"On the file Import selection dialog, you can specify the encoding to use when importing.  You could try another likely encoding (Western - Windows Latin 1 - maybe?) and see if that helps."

I am only offered utf-8, with the selection box grayed out. On OSX.
Reply all
Reply to author
Forward
0 new messages