Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDCurses-win10-jp #105

Open
Hamayama opened this issue Dec 6, 2020 · 3 comments
Open

PDCurses-win10-jp #105

Hamayama opened this issue Dec 6, 2020 · 3 comments

Comments

@Hamayama
Copy link

Hamayama commented Dec 6, 2020

Hello.

On Windows 10, the display corruption of Japanese characters occurs in wincon port.
(On Windows 8.1 or earlier, it doesn't occur.)

I made a modified version of PDCurses to fix this issue.
https://github.com/Hamayama/PDCurses-win10-jp
(Sorry, the document is Japanese only ...)

I'm using this as the front end of Lem editor.
https://github.com/cxxxr/lem
https://github.com/cxxxr/lem/wiki/Windows-Platform

The whole difference from the mainstream could be seen in the following URL.
Hamayama/PDCurses-win10-jp@pdcurses-3.9-orig-618e0aa...master

I wonder this is too complex to merge to the mainstream.
(And also, MS is recently recommending VT escape sequence instead of Windows Console API.
So, this patch might be useless in few years ...)

So, this is just an information.

Related issues : #87 #92

@GitMensch
Copy link
Contributor

I wonder this is too complex to merge to the mainstream.

Definitely. I think the array check fix should be applied in any case and I suggest to create a new PR for that.

And also, MS is recently recommending VT escape sequence instead of Windows Console API.

In that case I highly suggest to check out the VT port in PDCursesMod and test how well that works for you in general.

@Bill-Gray
Copy link
Contributor

The array check fixes definitely should be applied. It appears to me that you have found three places where array index checks are out of order.

@Bill-Gray
Copy link
Contributor

Actually, a fourth check is in this pull release, to ensure that _new_packet() does not attempt to handle more than 512 characters. I would suggest this fix to break oversized packets into a series of smaller packets. For testing, I tried a MAX_PACKET_SIZE of 4, just to ensure a situation in which lots of packets would be broken. Speed suffered; a 128-character packet size should avoid that problem.

Note that the X11 PDC_transform_line() has a similar issue, amenable to a similar fix. Possibly other platforms as well (my fork has no such limits in WinGUI and the SDLs.) I'll push the X11 fix for my fork after checking other platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants