Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreParameters.java	(revision 43282)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreParameters.java	(revision 43283)
@@ -74,6 +74,7 @@
     private static final String LOCALE = "locale";
     private static final String POINT_COLUMN_NAME = "pointColumnName";
     private static final String LIMIT = "limit";
+    private static final String GEOEMTRY_COLUMN = "geometry_column";
 
     private DelegatedDynObject parameters;
 
@@ -171,6 +172,11 @@
         return StringEscapeUtils.unescapeJava(s);
     }
 
+    public static String getGeometryColumn(DynObject dynobj) {
+        String s = (String) dynobj.getDynValue(GEOEMTRY_COLUMN);
+        return s;
+    }
+
     static Locale getLocale(DynObject dynobj) {
         try {
             String s = (String) dynobj.getDynValue(LOCALE);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/CSVReader.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/CSVReader.java	(revision 43282)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/CSVReader.java	(revision 43283)
@@ -1,7 +1,7 @@
 package org.gvsig.fmap.dal.store.csv.simplereaders;
 
-import java.io.FileReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.List;
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.fmap.dal.store.csv.CSVStoreParameters;
@@ -26,7 +26,7 @@
     private List<String>  nextLine;
     private int columns;
 
-    public CSVReader(FileReader in, CSVStoreParameters parameters) {
+    public CSVReader(InputStreamReader in, CSVStoreParameters parameters) {
         this(parameters);
         this.reader = new CsvListReader(in, getCSVPreferences());
     }    
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/FixedLenReader.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/FixedLenReader.java	(revision 43282)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/FixedLenReader.java	(revision 43283)
@@ -2,8 +2,8 @@
 package org.gvsig.fmap.dal.store.csv.simplereaders;
 
 import java.io.BufferedReader;
-import java.io.FileReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.commons.lang3.StringUtils;
@@ -20,7 +20,7 @@
     private final String commentStartMarker;
     private int currentLine =1;
 
-    public FixedLenReader(FileReader reader, CSVStoreParameters parameters) {
+    public FixedLenReader(InputStreamReader reader, CSVStoreParameters parameters) {
 //        this.parameters = parameters;
         this.reader = new BufferedReader(reader);
         this.fieldsDefinition = CSVStoreParameters.getFieldsDefinition(parameters);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java	(revision 43282)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java	(revision 43283)
@@ -23,11 +23,14 @@
 package org.gvsig.fmap.dal.store.csv;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.net.URL;
-import java.text.SimpleDateFormat;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -746,6 +749,23 @@
                 logger.warn("Can't set geometry type for the calculated field in CSV file '" + getFullFileName() + "'.", e);
             }
         }
+        
+        String geometry_column = CSVStoreParameters.getGeometryColumn(this.getParameters());
+        if( !StringUtils.isEmpty(geometry_column) ) {
+            EditableFeatureAttributeDescriptor attr = (EditableFeatureAttributeDescriptor) fType.get(geometry_column);
+            if( attr!=null && attr.getType()!=DataTypes.GEOMETRY ) {
+                attr.setDataType(DataTypes.GEOMETRY);
+                GeometryManager geommgr = GeometryLocator.getGeometryManager();
+                GeometryType gt;
+                try {
+                    gt = geommgr.getGeometryType(Geometry.TYPES.GEOMETRY, Geometry.SUBTYPES.UNKNOWN);
+                    attr.setGeometryType(gt);
+                } catch (Exception e) {
+                    logger.warn("Can't set geometry type for the calculated field in CSV file '" + getFullFileName() + "'.", e);
+                }
+                fType.setDefaultGeometryAttributeName(geometry_column);
+            }
+        }
         return fType;
     }
 
@@ -889,7 +909,7 @@
 
     }
 
-    private SimpleReader getSimpleReader(FileReader in) {
+    private SimpleReader getSimpleReader(InputStreamReader in) {
         SimpleReader reader;
         if (CSVStoreParameters.getRawFieldsDefinition(getCSVParameters()) != null) {
             reader = new FixedLenReader(in, getCSVParameters());
@@ -917,8 +937,26 @@
         return headers;
     }
 
+    private InputStreamReader openFile(File f, String charsetName) throws FileNotFoundException {
+        Charset charset = Charset.defaultCharset();
+        FileInputStream fis = new FileInputStream(f);
+        if( !StringUtils.isEmpty(charsetName) ) {
+            if( Charset.isSupported(charsetName) )  {
+                try {
+                    charset = Charset.forName(charsetName);
+                } catch(Throwable th) {
+                    logger.warn("Can't use charset '"+charsetName+"' for read csv '"+this.getFullFileName()+"'.", th);
+                }
+            } else {
+                logger.warn("charset '"+charsetName+"' not supported for read csv '"+this.getFullFileName()+"'.");                
+            }
+        }
+        InputStreamReader isr = new InputStreamReader(fis, charset);
+        return isr;
+    }
+    
     private void loadFeatures() {
-        FileReader in = null;
+        InputStreamReader in = null;
         SimpleReader reader = null;
         try {
             String headers[] = null;
@@ -926,7 +964,10 @@
 
             boolean ignore_errors = CSVStoreParameters.getIgnoreErrors(getCSVParameters());
 
-            in = new FileReader(this.getCSVParameters().getFile());
+            in = openFile(
+                this.getCSVParameters().getFile(), 
+                CSVStoreParameters.getCharset(this.getCSVParameters())
+            );
 
             reader = getSimpleReader(in);
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java	(revision 43282)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java	(revision 43283)
@@ -197,6 +197,9 @@
             case DataTypes.STRING:
             case DataTypes.TIME:
             case DataTypes.TIMESTAMP:
+            case DataTypes.URI:
+            case DataTypes.URL:
+            case DataTypes.FILE:
                 break;
 
             default:
