On 10/5/2010 12:52 PM, Derek Turner wrote:
> On Tue, 05 Oct 2010 12:05:34 -0400, Jerry Stuckle wrote:
>
>> Right idea, but some problems. First of all, what happens if a field
>> contains a comma i.e. "Smith, Jr.".
>
> Never thought of that, it's not something we would even consider in
> Britain, nor 2nd or 3rd.
>
>
>> Text fields also need to be
>> surrounded by double quotes, and any double quotes in the text field
>> must be doubled to be a valid CSV file.
>
> When TB exports a csv it doesn't quote text fields so presumably it
> doesn't need them quoted to import them:
What if I have in there that my nickname is Shelly ("sheldonlg")? How
does the db have the " in the table? How is that retrieved? How does
that appear when written to the browser? What if single quotes are used
as in O'Reilly? That is what Jerry is talking about. You always have
to be concerned with things like this.
>
> <export>
> First Name,Last Name,Display Name,Nickname,Primary Email,Secondary
> Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile
> Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home
> Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work
> Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth
> Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
> ,,Tim(at)Wynsors(dot)com,,newsletter(at)mail(dot)wynsors(dot)com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,247Spares,,no-reply(at)247spares(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,Novatech,,ewmail(at)novatech(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,,,newsletter(at)maplin(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> </export>
>
>> Also, some places use a
>
> Use a what?
>
>>
>> Then just output directly with the appropriate headers.
>
> Yes, I like the idea of an output buffer downthread.
>
--
Shelly
|