Skip to content

Commit

Permalink
fix screencode encoding selection
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jan 19, 2022
1 parent 651c383 commit 53bf8c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions codeGeneration/src/prog8/codegen/target/Encoder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal object Encoder: IStringEncoding {
override fun encodeString(str: String, encoding: Encoding): List<UByte> { // TODO use Result
val coded = when(encoding) {
Encoding.PETSCII -> PetsciiEncoding.encodePetscii(str, true)
Encoding.SCREENCODES -> PetsciiEncoding.encodePetscii(str, true)
Encoding.SCREENCODES -> PetsciiEncoding.encodeScreencode(str, true)
Encoding.ISO -> IsoEncoding.encode(str)
else -> throw FatalAstException("unsupported encoding $encoding")
}
Expand All @@ -23,7 +23,7 @@ internal object Encoder: IStringEncoding {
override fun decodeString(bytes: List<UByte>, encoding: Encoding): String { // TODO use Result
val decoded = when(encoding) {
Encoding.PETSCII -> PetsciiEncoding.decodePetscii(bytes, true)
Encoding.SCREENCODES -> PetsciiEncoding.decodePetscii(bytes, true)
Encoding.SCREENCODES -> PetsciiEncoding.decodeScreencode(bytes, true)
Encoding.ISO -> IsoEncoding.decode(bytes)
else -> throw FatalAstException("unsupported encoding $encoding")
}
Expand Down
4 changes: 2 additions & 2 deletions docs/source/todo.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TODO
====

For next compiler release (7.7)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For next release
^^^^^^^^^^^^^^^^
...


Expand Down

0 comments on commit 53bf8c0

Please sign in to comment.