Skip to content

Commit

Permalink
Changes for #85
Browse files Browse the repository at this point in the history
  • Loading branch information
eMaringolo committed Jun 28, 2021
1 parent 9488047 commit fa05497
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/.configmaps
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
{
#name : 'TonelReaderModel',
#versionName : 'strategies-2',
#ts : 3802344748
#versionName : 'strategies-3',
#ts : 3802346469
},
{
#name : 'TonelTools',
Expand Down
12 changes: 12 additions & 0 deletions source/TonelReaderModel/CfsPath.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
4 changes: 1 addition & 3 deletions source/TonelReaderModel/TonelReader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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]
]

Expand Down

0 comments on commit fa05497

Please sign in to comment.