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

Chinese character support #43

Closed
ox000008 opened this issue Feb 13, 2023 · 14 comments
Closed

Chinese character support #43

ox000008 opened this issue Feb 13, 2023 · 14 comments

Comments

@ox000008
Copy link

The editor can not support Chinese character.

@PaulSquires
Copy link
Owner

By default, new files are opened using "ANSI" mode. You will need to switch the file to either "UTF-8 (BOM)" or "UTF-16 (BOM". You do that by clicking on the area in the status bar (located in the bottom right of the editor) and then select the file format.

@ox000008
Copy link
Author

ox000008 commented Feb 14, 2023 via email

@PaulSquires
Copy link
Owner

Hi, did you intend to post a screenshot or a log output? All I see in your message is the result is "Quick run."
Also, are you using version 3.0.8 and the WinFBE_Suite that includes the FB compiler?

@ox000008
Copy link
Author

ox000008 commented Feb 14, 2023 via email

@PaulSquires
Copy link
Owner

Sorry. I can not .
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files

Maybe you could post here a small snippet of your Chinese code and I will try to run it on my machine to see what error messages are generated.

@ox000008
Copy link
Author

ox000008 commented Feb 14, 2023 via email

@ox000008
Copy link
Author

Here are the snapshots. Previously I have replied on the email, so the attached pictures was missing.
Quick Run
Quick Run

Compile and Run
Compile and Run

I have an idea that Can WinFBE have the function of "Open Declaration" like in the "Eclipse IDE"
Open Declaration

@PaulSquires
Copy link
Owner

Hi, thank you for the additional details. I have found an error in the "Quick Run" code that would cause display errors. Because I do not have a Chinese Windows version, I used the following source code to test:

I have also uploaded new EXE's for you to test. Simply replace your existing WinFBE EXE's with the ones in the zip archive.
https://www.planetsquires.com/files/chinese_quickrun_test.zip
Please let me know if the problem is fixed.

#include "Afx/AfxWin.inc"

' Comment the following line to enable/disable the
' Chinese code page for console output. The Print
' statement to the console window will look differently
' depending on whether the correct code page is set.
SetConsoleOutputCP(936)

' Using WinFBX's dynamic CWSTR class
dim as CWSTR text1
text1 = "吉伊杰杰勒 吉勒吾 诶艾伊 儿勒屁"
print text1

' Using FreeBasic's built in wstring
dim text2 as wstring * 256
text2 = "吉伊杰杰勒 吉勒吾 诶艾伊 儿勒屁"
print text2

' These calls to the Windows messagebox function should
' correctly display the Chinese text regardless of what
' console code page is set.
AfxMsg( text1 )
AfxMsg( text2 )

@ox000008
Copy link
Author

Hi Paul,

There is a new issue now. When I run the compiled "hello.exe", there is no output window display, but the process is running.
image

@PaulSquires
Copy link
Owner

From your screenshot it looks like you compiled the EXE for "Win64 GUI (Release)".
You should have compiled it for "Console" rather than "GUI".
Make the change and see if you continue to have a zombie process.

@ox000008
Copy link
Author

yes, I make that mistake,
Now I run the hello.exe and the Chinese characters have overlaps.
image

@ox000008
Copy link
Author

And the Quick Run issue has been fixed.

@PaulSquires
Copy link
Owner

Hi, that is most likely due to the font that the console uses rather than anything related to WinFBE. Try changing to a different default font for your console and see if that fixes the display issue.

Thanks for reporting back that the Quick Run issue is fixed! That's great news.

@ox000008
Copy link
Author

Hi Paul,

I did not find how to change the font or other configuration to fix the overlaps. Instead I can add a space between each character to avoid that issue. Thanks for help.

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

2 participants