Skip to content

Fix output character conversion#32

Open
olafkryus wants to merge 1 commit intosuomipelit:masterfrom
olafkryus:fix/output-encoding
Open

Fix output character conversion#32
olafkryus wants to merge 1 commit intosuomipelit:masterfrom
olafkryus:fix/output-encoding

Conversation

@olafkryus
Copy link
Copy Markdown
Collaborator

This Pull request changes the implementation of the SJ3HELP.toansi function, so that the passed text in the IBM865 code page is converted not to an extended ASCII, but the UTF-8 encoding. This function was used for the *.TXT file output, and has been reused here for the console output also. This should result in a correct display of special characters on modern (especially non-Nordic?) systems.

A few tweaks, rearrangements and workarounds were needed for the SJ3UNIT.lopputext procedure, as the Crt.Window procedure seems not to handle multi-byte text output particularly well.

Outro screen (Ubuntu 24.04.4 LTS + fpc 3.2.2):

Before After
Outro screen, before Outro screen, after

This probably needs some testing on Windows & macOS too before merging.

@veikkos
Copy link
Copy Markdown
Member

veikkos commented Mar 25, 2026

I'll test this on Windows!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants