hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

how to support utf-8 for trace ?

Open sonygod opened this issue 5 years ago • 16 comments

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

sonygod avatar Aug 03 '19 07:08 sonygod

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 avatar Aug 03 '19 09:08 Aurel300

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

hxcpp 4.0.8

@Aurel300 @hughsando

sonygod avatar Oct 31 '19 06:10 sonygod

4.0.8 is not the latest hxcpp Please update.

RealyUniqueName avatar Oct 31 '19 09:10 RealyUniqueName

image

git version

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

@RealyUniqueName

sonygod avatar Nov 02 '19 03:11 sonygod

Did you update your hxcpp installation to 4.0.52?

RealyUniqueName avatar Nov 02 '19 08:11 RealyUniqueName

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

sonygod avatar Nov 02 '19 12:11 sonygod

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).

RealyUniqueName avatar Nov 02 '19 12:11 RealyUniqueName

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

sonygod avatar Nov 04 '19 11:11 sonygod

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

RealyUniqueName avatar Nov 04 '19 14:11 RealyUniqueName

yes ,@RealyUniqueName

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

image

sonygod avatar Nov 05 '19 03:11 sonygod

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.

ncannasse avatar Nov 05 '19 12:11 ncannasse

R32 fixed this. work!

sonygod avatar Jan 26 '20 04:01 sonygod

Leaving the issue open until the PR is merged.

RealyUniqueName avatar Jan 26 '20 12:01 RealyUniqueName

also not support sqlite and mysql

https://github.com/HaxeFoundation/hxcpp/issues/900

sonygod avatar May 08 '20 06:05 sonygod

image

hxWidgets also garbled, "chcp 65001" not work!

also https://github.com/haxeui/haxeui-hxwidgets/issues/25

hlizard avatar Aug 04 '20 09:08 hlizard

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

hlizard avatar Feb 26 '21 06:02 hlizard