hxcpp
hxcpp copied to clipboard
how to support utf-8 for trace ?
how to support utf-8 for trace ? -D What?
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).
why close ,it's still not support 中文 utf-8 string trace.
hxcpp 4.0.8
@Aurel300 @hughsando
4.0.8 is not the latest hxcpp Please update.
git version
it's wrong ,Chinese garbled..not utf-8
@RealyUniqueName
Did you update your hxcpp installation to 4.0.52?
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
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).
Ubuntu default and windows7 default terminal , and hashlink got right results
So, it works with hashlink, but doesn't work with hxcpp?
yes ,@RealyUniqueName
hxcpp is support 中文 on ubuntu 18 ,but not work on windows.
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 fixed this. work!
Leaving the issue open until the PR is merged.
also not support sqlite and mysql
https://github.com/HaxeFoundation/hxcpp/issues/900
hxWidgets also garbled, "chcp 65001" not work!
also https://github.com/haxeui/haxeui-hxwidgets/issues/25
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.