From fa05497615e471b9636c884328383fbd192e837b Mon Sep 17 00:00:00 2001
From: "Esteban A. Maringolo" <emaringolo@gmail.com>
Date: Mon, 28 Jun 2021 15:56:33 -0300
Subject: [PATCH] Changes for #85

---
 source/.configmaps                           |  4 ++--
 source/TonelReaderModel/CfsPath.extension.st | 12 ++++++++++++
 source/TonelReaderModel/TonelReader.class.st |  4 +---
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/source/.configmaps b/source/.configmaps
index c0bf7f1..ff915ce 100644
--- a/source/.configmaps
+++ b/source/.configmaps
@@ -27,8 +27,8 @@
 			},
 			{
 				#name : 'TonelReaderModel',
-				#versionName : 'strategies-2',
-				#ts : 3802344748
+				#versionName : 'strategies-3',
+				#ts : 3802346469
 			},
 			{
 				#name : 'TonelTools',
diff --git a/source/TonelReaderModel/CfsPath.extension.st b/source/TonelReaderModel/CfsPath.extension.st
index 06376bb..119c550 100644
--- a/source/TonelReaderModel/CfsPath.extension.st
+++ b/source/TonelReaderModel/CfsPath.extension.st
@@ -25,3 +25,15 @@ CfsPath >> readUtf8StreamDo: aBlock [
 				] ensure: [stream close].
 				latin1 ifNotNil: [aBlock value: latin1 readStream]]
 ]
+
+{ #category : '*TonelReaderModel',
+ #vaCategories : ['CFS-API'] }
+CfsPath >> utf8Contents [
+	"Answer the contents of receiver asuming it was encoded using UTF-8."
+
+	| output |
+
+	output := WriteStream on: String new.
+	self readUtf8StreamDo: [:input | [input atEnd] whileFalse: [output nextPut: input next]].
+	^output contents
+]
diff --git a/source/TonelReaderModel/TonelReader.class.st b/source/TonelReaderModel/TonelReader.class.st
index b5204fc..c2b5433 100644
--- a/source/TonelReaderModel/TonelReader.class.st
+++ b/source/TonelReaderModel/TonelReader.class.st
@@ -124,9 +124,7 @@ TonelReader >> readConfigurationMapsFrom: sourceDirPath [
 	configurationMaps :=
 		(sourceDirPath append: self configMapsFilename) exists
 			ifTrue: [
-				(STONReader on: (
-					CfsReadFileStream open: (sourceDirPath append: self configMapsFilename) asString))
-						next]
+				(STONReader on: ((sourceDirPath append: self configMapsFilename) utf8Contents readStream)) next]
 			ifFalse: [OrderedCollection new]
 ]