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

Sys.args with unicode #783

Closed
wants to merge 2 commits into from

Conversation

Aurel300
Copy link
Member

More Unicode fixes…

  • dup() fixed for UTF-16 strings
  • should dupConst() be fixed also? I'm not sure what the const refers to there
  • fix __get_args if _hxcpp_argc/v is set
  • fix __get_args on OS X
  • fix __get_args for Linux and Windows - these all add to a string character by character, even though the "characters" are actually partial Unicode bytes; some temporary buffer should be allocated and then decoded into a String I assume?

@hughsando
Copy link
Member

'dup' is problematic and will be removed. Originally, this was to convert non-gc pointers to gc-pointers. We can't actually check whether a non-gc pointer is utf16 encoded because it will not have a header so other ways are needed. 'dup' should be replaced with 'create' calls if possible.
The 'dupConst' allocates memory outside the normal GC arenas, and this memory can't be reclaimed and so if for permanent strings. There is no reason why this can't the utf16 encoded, but I will need to check to see if its called on non-gc strings. Some kind of 'createConst' might be better now.

@hughsando
Copy link
Member

These changes have been incorporated in recent changes that removed 'dup'. Thanks.

@hughsando hughsando closed this Apr 26, 2019
@Aurel300 Aurel300 deleted the issue/unicode-args branch April 26, 2019 11:11
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 this pull request may close these issues.

2 participants