Skip to content
Snippets Groups Projects
Commit df6a6e89 authored by Jürgen Walter's avatar Jürgen Walter
Browse files

ANSI ==> UTF-8

parent 6e0aff0b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
......@@ -15,6 +16,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import de.uka.ipd.sdq.pcm.allocation.Allocation;
......@@ -121,9 +123,13 @@ public class PCMEMF {
public static void saveAll() {
resourceSet.getResources().remove(0); // do not save resource types
for (Resource resource : resourceSet.getResources()) {
HashMap<String, Object> options = new HashMap<String, Object>();
options.put(XMLResource.OPTION_ENCODING, "UTF-8"); //Collections.EMPTY_MAP) ==> ANSI
for (Resource resource : resourceSet.getResources()) {
try {
resource.save(Collections.EMPTY_MAP);
resource.save(options);
} catch (IOException e) {
log.error(e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment