Fixed problem when importing in zkwebui with UTF-8

FR [1658127] - Select charset encoding on import
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=1658127
This commit is contained in:
Carlos Ruiz 2010-03-30 05:06:39 +00:00
parent 0a44f15fc6
commit 7fb2a677c5
1 changed files with 11 additions and 3 deletions

View File

@ -333,10 +333,18 @@ public class WFileImport extends ADForm implements EventListener
if (media == null)
return;
if (media.isBinary())
if (media.isBinary()) {
m_file_istream = media.getStreamData();
else
m_file_istream = new ReaderInputStream(media.getReaderData());
}
else {
ListItem listitem = fCharset.getSelectedItem();
if (listitem == null) {
m_file_istream = new ReaderInputStream(media.getReaderData());
} else {
Charset charset = (Charset)listitem.getValue();
m_file_istream = new ReaderInputStream(media.getReaderData(), charset.name());
}
}
log.config(media.getName());
bFile.setLabel(media.getName());