From 7fb2a677c5f079f5c0007b97046585255ae98474 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 30 Mar 2010 05:06:39 +0000 Subject: [PATCH] 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 --- .../org/adempiere/webui/apps/form/WFileImport.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java index f04132282a..2f34557e11 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java @@ -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());