Revision 3609
Added by Aaron Marcuse-Kubitza over 12 years ago
csv2db | ||
---|---|---|
74 | 74 |
info = csvs.stream_info(in_, parse_header=True) |
75 | 75 |
dialect = info.dialect |
76 | 76 |
if csvs.is_tsv(dialect): use_copy_from[0] = False |
77 |
col_names = info.header
|
|
77 |
col_names = map(strings.to_unicode, info.header)
|
|
78 | 78 |
for i, col in enumerate(col_names): # replace empty column names |
79 | 79 |
if col == '': col_names[i] = 'column_'+str(i) |
80 | 80 |
|
Also available in: Unified diff
csv2db: Run strings.to_unicode() on column names to handle Unicode chars