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

Question marks everywhere #3

Open
adiee5 opened this issue Jan 15, 2023 · 1 comment
Open

Question marks everywhere #3

adiee5 opened this issue Jan 15, 2023 · 1 comment
Labels
question Further information is requested

Comments

@adiee5
Copy link

adiee5 commented Jan 15, 2023

How to fix those text labels, where are those string stored in the code (i haven't built it, i downloaded from releases) or at least what do they mean
image

@lwu309 lwu309 added the question Further information is requested label Jan 19, 2023
@lwu309
Copy link
Owner

lwu309 commented Jan 19, 2023

Technical details

Why is this happening?

This is because ANSI version of Windows API functions are used. It is a must in order to keep compatibility with Windows 9x, which exists in the 32-bit binary release.

When using ANSI version of Windows API functions, Unicode text stored in resources are converted to the text encoding of the current codepage of your Windows environment before they are displayed. Only characters supported by your current codepage can be displayed properly, the rest are converted to question marks (?).

The question marks in your snapshot are Japanese kana and kanji characters, which are unsupported in Windows-1252 and other Latin-1 compliant codepages. Therefore they are all converted to question marks.

How to fix it?

This can be fixed by changing the Windows API functions in the source code to their Unicode versions and building a binary without Windows 9x support. I may build one some day and put it under the release.

In this case UnicoWS can be used to preserve Windows 9x support but it is not perfect. Font support on Windows 9x is tailored to only what its codepage (depending on Windows language) supports. Those characters are still unable to be displayed properly if the system does not contain Japanese fonts.

What do they mean?

The texts in your snapshot are defined in the resource file:

Scmpoo/Scmpoo/Scmpoo.rc

Lines 19 to 32 in 6ea03ec

107 DIALOG MOVEABLE PURE 0, 0, 149, 83
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Screen Mate ポーの設定"
FONT 9, "MS Pゴシック"
BEGIN
CONTROL "OK", IDOK, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, 92, 7, 50, 14
CONTROL "キャンセル", IDCANCEL, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 92, 25, 50, 14
CONTROL "&Help", IDRETRY, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 92, 43, 50, 14
CONTROL "終了", IDABORT, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 92, 61, 50, 14
CONTROL "泣き声", 1002, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX, 7, 7, 57, 10
CONTROL "時報をならす", 1001, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX, 7, 23, 69, 10
CONTROL "常に動く", 1003, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX, 7, 39, 57, 10
CONTROL "常に重力が有効", 1004, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX, 7, 56, 74, 10
END

Here is a brief translation:

Caption

Japanese English
Screen Mate ポーの設定 Screen Mate Poe settings

Checkboxes

Japanese English
泣き声 Crying voice
時報をならす Hourly chime
常に動く Always moving
常に重力が有効 Gravity always enabled

Buttons

Japanese English
OK OK
キャンセル Cancel
Help Help
終了 Exit

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

No branches or pull requests

2 participants