Unlike XML, CSV files don't have a tag or any other option to tell
which encoding the characters are. Hence Word, Excel etc are assuing
the encoding is equal to you computers default encoding (CP1259 in
Germany). Some programms are more intelligent than others and
recognize if certain byte codes are not allowed within the assumed
charset and than ask you (e.g. WORD). You need to output the CSV file
with the encoding you are using on your computer.
Juergen
On 4/16/07, LongkerDandy <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm try to export a table to CSV format;
> Following the example from "wicket.examples.displaytag.export", most
> things goes well, except the encooding.
> It seems that when I export it to the CSV or XLS format, the Excel don't
> know what encoding my file used.
> All the Chinese characters in CSV and XLS are crap, and when exports to
> XML it works well with the browser at UTF-8 encoding.
> Plus, when I use WORD to open my CSV files, it asked me to choose the
> encoding, and with "UTF-8", it just fine.
>
> So I think the Excel may not know the encoding by himself,
> I wondered if there is a way to let him know.
>
> I tried this
>
> response.setCharacterEncoding("UTF-8");
>
> while reponse is WebResponse.
> But no luck.
>
> Any idea to fix that?
>
> Regards
> LongkerDandy
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user