We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using this haxe code
function main() { Sys.println("אבגדהו"); var list={ "אבגדהו":"abcd", "אבדהו":"abcd", } trace(list); }
In the first print, the Hebrew characters are copied directly to the resulting php file.
However for the object keys, they are trying to get escaped, but the algorithm is not good. א in utf8 is D7 90
this is 215 144 in decimal
PHP would interpret backslash escape as octal, but the Haxe generator inserts the decimal values instead.
The result is that the characters render as gibberish.
It would need any of the follwing
I tried to navigate the php7 gen file, but was unsuccesfull in finding the cause.
In control charecters less then ASCII 32, the generator is using haxedecimal escaping such as \x0A which is good.
generates the follwing php
<?php /** * Generated by Haxe 4.3.4 */ namespace _TestPhp; use \php\_Boot\HxAnon; use \php\Boot; use \haxe\Log; final class TestPhp_Fields_ { /** * @return void */ public static function main () { #TestPhp.hx:2: characters 5-26 echo("אבגדהו" . \PHP_EOL); #TestPhp.hx:3: lines 3-6 $list = new HxAnon([ "\215\144\215\145\215\146\215\147\215\148\215\149" => "abcd", "\215\144\215\145\215\147\215\148\215\149" => "abcd", ]); #TestPhp.hx:7: characters 5-10 (Log::$trace)($list, new HxAnon([ "fileName" => "TestPhp.hx", "lineNumber" => 7, "className" => "_TestPhp.TestPhp_Fields_", "methodName" => "main", ])); } } Boot::registerClass(TestPhp_Fields_::class, '_TestPhp.TestPhp_Fields_');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using this haxe code
In the first print, the Hebrew characters are copied directly to the resulting php file.
However for the object keys, they are trying to get escaped, but the algorithm is not good.
א
in utf8 is D7 90
this is 215 144 in decimal
PHP would interpret backslash escape as octal, but the Haxe generator inserts the decimal values instead.
The result is that the characters render as gibberish.
It would need any of the follwing
I tried to navigate the php7 gen file, but was unsuccesfull in finding the cause.
In control charecters less then ASCII 32, the generator is using haxedecimal escaping such as \x0A which is good.
generates the follwing php
The text was updated successfully, but these errors were encountered: