Thanks for a great CSV parser!
Here's my feature request, I'll start with my use case:
I am parsing Dates in the format "Tue Oct 4 09:34:02 2005". This translates to "new ParseDate("E MMM dd HH:mm:ss yyyy")".
This would work fine on a machine with the locale set to English/US. However if the locale is set to something else (german in my case) you'll get parse exceptions because 'Tue' is not a day in german.
One would have the same problem if you wanted to parse a german date on a US/UK machine.
There are three solutions to this problem:
1) I write my own Processor that takes a Locale as additional argument(easy but custom solution)
2) I call Locale.setDefault(Locale.ENGLISH) and change it back after reading. However this is a global fix and may cause trouble if other code is running concurrently. Dirty.
3) The existing ParseDate gets a second optional parameter (Locale) which tells SuperCSV what Locale it should assume for the input data.
IMHO Locale support should be part of the library and added it possible.
If I have the time I'll write a patch for this issue.
Log in to post a comment.