Skip to content

Commit 7f69946

Browse files
committed
ST6RI-531 Set encoding load option for Xtext to UTF-8 in SysMLUtil.
1 parent 0df838f commit 7f69946

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

org.omg.sysml/src/org/omg/sysml/util/SysMLUtil.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2019, 2020 Model Driven Solutions, Inc.
3+
* Copyright (c) 2019-2022 Model Driven Solutions, Inc.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -38,6 +38,7 @@
3838
import org.eclipse.emf.ecore.util.EcoreUtil;
3939
import org.eclipse.xtext.resource.IResourceDescription.Manager;
4040
import org.eclipse.xtext.resource.IResourceServiceProvider;
41+
import org.eclipse.xtext.resource.XtextResource;
4142
import org.eclipse.xtext.resource.impl.ResourceDescriptionsData;
4243
import org.omg.sysml.lang.sysml.SysMLPackage;
4344

@@ -68,6 +69,7 @@ protected SysMLUtil() {
6869
protected SysMLUtil(ResourceDescriptionsData resourceDescriptionData) {
6970
SysMLPackage.eINSTANCE.getName();
7071
this.resourceSet = new ResourceSetImpl();
72+
this.resourceSet.getLoadOptions().put(XtextResource.OPTION_ENCODING, "UTF-8");
7173
this.index = resourceDescriptionData;
7274
ResourceDescriptionsData.ResourceSetAdapter.installResourceDescriptionsData(this.resourceSet, this.index);
7375
}
@@ -214,7 +216,7 @@ public void readAll(final File file, boolean isInput) {
214216
}
215217

216218
/**
217-
* If the given path identifies an file with an allowable extension, then read it.
219+
* If the given path identifies a file with an allowable extension, then read it.
218220
* If the given path is for a directory, then recursively read all the allowable files in it,
219221
* directly or indirectly.
220222
*

0 commit comments

Comments
 (0)