tin schrieb:
> I need to have a CSV import functionality in my application. User can
> give CSV files to the web client and then the server is supposed to
> understand its contents and persist the data.
> 
> What would be the best approach to handle this?
> 
> - I upload the CSV file from the web client and use a library to parse
> its contents on the server
> - I parse the CSV on the web client itself and then pass the data to
> the server (using RPC or JSON)
> 
> Any examples or pointers to best approaches to handle this problem
> willl be highly appreciated.

I would parse it on the server-side by using one of the CSV-parser-
libraries around. That way you can support different charsets, the
file might be encoded with (on Windows you most often see Cp1252,
Cp850, UTF8 and UFT16, on Linux-systems dependent on their age
ISO-8859-1 and UTF-8). If you want to develop a platform-independent
application you would have to implement the conversion on the
client-side which is unnecessary in my eyes.

As well, CSV is not a standard per se, so there are different
separators for values, some values might be escaped by quotation-
marks or other characters. This topic is quite complex and re-
inventing the wheel (as you would have to if you want to implement
a GWT-compliant class) is a huge effort.


Regards, Lothar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to