You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Martin Goebel <x-...@gmx.de> on 2010/01/01 12:20:45 UTC
Re: UTF-8 support on CSV
Hi!
By my experience Excel behaves strange, handling CSV.
Opening CSV by double-click leads to someting like a convenience-mode.
This way Excel don't cares about the right charset, or has the wrong
default respectively.
Rename the file to .txt and select the file with the same filter
(Textfiles *.prn, *.txt, *.csv). then you will get a dialog, where you
can choose delimiters, charset and field-types. Now you can select
UTF-8! But only since Ofice 2003. I have to work with an Office 2000,
partly. It can't deal with UTF-8 at all, reading from text-files.
I would think about writing an Excel File with POI/HSSF to avoid these
Problems.
Regards, mago
Shibu Kumar Nair schrieb:
> Hi all,
>
>
>
> I have a struts 2 application from which user can download CSV file.
>
> The problem is
>
> I download the CSV on the website then save to desktop of my
> computer and Open it on NOTEPAD...
>
> that works fine I could still see all the utf-8 text OK with no problem, but
> if I open the CSV file in Microsoft EXCEL,
>
> all the utf-8 text are no longer readable.
>
>
>
> Does any one have the solution for this, how could I make it readable in MS
> Excel
>
> I am using org.apache.commons.io.FileUtils
>
> FileUtils.writeStringToFile(file, test);
>
> i also tried it with
>
> FileUtils.writeStringToFile(file, test,encoding) method
>
> Still the problem exists
>
>
>
>
>
> Regards
>
> Shibu
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org