Export table field sizes are inadequate
A client modified the default options for gender to include some values longer than 16 characters.
The export code tries to put them in a varchar(16) size field and it breaks.
The code seems to think that an integer field (CRM_Utils_Type::T_INT) should be fine with a varchar(16) to hold it (https://github.com/civicrm/civicrm-core/blob/master/CRM/Export/BAO/Export.php, line 1123), but the thing is that it's putting the value, not the key as stored in the civicrm_contact table, so there's no telling how big a field you might want there. [As of July 30, 2018, the code is now in the ExportProcessor.php class pulled out in recent work by Eileen.]
I notice that there's some code to put in exceptions for prefix_id and suffix_id to use varchar(255), which seems like a short-sighted hack since it's going to potentially affect all the integer fields (at least, those that are storing keys into option groups).
So - either all integer fields should use varchar(255), or if this is just another exception, it can be added to the list (the vaguely named lookUp variable ...). Here's where those exceptions were added, it seems like not enough consideration was given to the actual cause of the problem: https://issues.civicrm.org/jira/browse/CRM-15877
Happy to put together a PR if no one has any additional insight.