Skip to content

Commit a267fbd

Browse files
authored
Merge pull request #156 from nextTukanos/symbolsShouldBeStrings
Update detectEncoding..st
2 parents 3041096 + d7174ea commit a267fbd

File tree

1 file changed

+2
-2
lines changed
  • repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class

1 file changed

+2
-2
lines changed

repository/Zinc-Character-Encoding-Core.package/ZnCharacterEncoder.class/class/detectEncoding..st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ detectEncoding: bytes
77

88
| candidates |
99
"Set up an ordered candidates list, 7-bit ascii and utf8 are reasonably reliable, iso88591 is a reasonable default"
10-
candidates := #(ascii utf8 iso88591).
10+
candidates := #('ascii' 'utf8' 'iso88591').
1111
candidates := candidates , (ZnByteEncoder knownEncodingIdentifiers difference: candidates).
1212
candidates := candidates , (self knownEncodingIdentifiers difference: candidates).
1313
"Try each and return the first one that succeeeds."
1414
candidates do: [ :identifier | | encoder |
1515
encoder := self newForEncoding: identifier.
1616
[ ^ encoder decodeBytes: bytes; yourself ] on: ZnCharacterEncodingError do: [ ] ].
17-
ZnCharacterEncodingError signal: 'No suitable encoder found'
17+
ZnCharacterEncodingError signal: 'No suitable encoder found'

0 commit comments

Comments
 (0)