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

how to support utf-8 for trace ? #842

Open
sonygod opened this issue Aug 3, 2019 · 16 comments · May be fixed by #880
Open

how to support utf-8 for trace ? #842

sonygod opened this issue Aug 3, 2019 · 16 comments · May be fixed by #880
Assignees

Comments

@sonygod
Copy link

sonygod commented Aug 3, 2019

how to support utf-8 for trace ?
-D What?

@Aurel300
Copy link
Member

Aurel300 commented Aug 3, 2019

If you are using the latest hxcpp, UTF-8 strings should work in trace by default. If you are on Windows, make sure your console is set up correctly to display UTF-8 output (cp 65001, Unicode-compatible font).

@Aurel300 Aurel300 closed this as completed Aug 3, 2019
@sonygod
Copy link
Author

sonygod commented Oct 31, 2019

why close ,it's still not support 中文 utf-8 string trace.

hxcpp 4.0.8

@Aurel300 @hughsando

@RealyUniqueName
Copy link
Member

4.0.8 is not the latest hxcpp
Please update.

@sonygod
Copy link
Author

sonygod commented Nov 2, 2019

image

git version

it's wrong ,Chinese garbled..not utf-8

@RealyUniqueName

@RealyUniqueName
Copy link
Member

Did you update your hxcpp installation to 4.0.52?

@sonygod
Copy link
Author

sonygod commented Nov 2, 2019

everything is update ,please reopen this issue

package;

class Main {
	static function main() {
		trace("hello 中文");
	}
}

C:\projects\bocai\pb\cpp>Main.exe
src/Main.hx:7: hello 涓枃

@Aurel300 @RealyUniqueName

@RealyUniqueName
Copy link
Member

Are you sure you have utf8 compatible terminal?

If you are on Windows, make sure your console is set up correctly to display UTF-8 output (cp 65001, Unicode-compatible font).

@sonygod
Copy link
Author

sonygod commented Nov 4, 2019

Ubuntu default and windows7 default terminal , and hashlink got right results

@RealyUniqueName
Copy link
Member

So, it works with hashlink, but doesn't work with hxcpp?

@sonygod
Copy link
Author

sonygod commented Nov 5, 2019

yes ,@RealyUniqueName

hxcpp is support 中文 on ubuntu 18 ,but not work on windows.

image

@ncannasse
Copy link
Member

Please note that HL does change the terminal mode but it's quite hard to do it right, I'm not sure I would recommend it for hxcpp.

@R32 R32 linked a pull request Jan 23, 2020 that will close this issue
@sonygod
Copy link
Author

sonygod commented Jan 26, 2020

R32 fixed this. work!

@sonygod sonygod closed this as completed Jan 26, 2020
@RealyUniqueName
Copy link
Member

Leaving the issue open until the PR is merged.

@sonygod
Copy link
Author

sonygod commented May 8, 2020

also not support sqlite and mysql

#900

@hlizard
Copy link

hlizard commented Aug 4, 2020

image

hxWidgets also garbled, "chcp 65001" not work!

also haxeui/haxeui-hxwidgets#25

@hlizard
Copy link

hlizard commented Feb 26, 2021

an interesting finding: use --cmd Main.exe in build.hxml or Git Bash can display Chinese correctly(console output). But run Main.exe in cmd.exe manually will display the same garbled code, whether CHCP 65001 is set or not.
image

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

Successfully merging a pull request may close this issue.

6 participants