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

Copyright symbol in compile constants values return incorrect String #553

Closed
itlancer opened this issue Sep 9, 2021 · 4 comments
Closed
Labels

Comments

@itlancer
Copy link

itlancer commented Sep 9, 2021

Copyright symbol in compile constants values return incorrect String.
So if you have in asconfig.json something like:

"define": [
	/**
	 * String values must be formatted with nested quotes, like "'hello'",
	 because the compiler will attempt to evaluate an expression when it encounters quotes.
	 */
	{"name": "CONFIG::PRODUCT_NAME",	"value": "'©'"}
],

With AS3 String you will get В© instead of ©.
It works fine with other IDEs.

Related (not the same) issue: #552

@joshtynjala
Copy link
Member

I'm not able to reproduce this issue. I see the copyright symbol displayed correctly, without any extra characters.

@itlancer
Copy link
Author

@joshtynjala
Thanks for your answer. I have checked with macOS - indeed it works fine.
But with Windows (tested with multiple different devices) it faults as described above.

@joshtynjala
Copy link
Member

Interesting. I wonder if it's some kind of text encoding issue on Windows. I'll take a look on my Windows machine when I get a chance.

@itlancer
Copy link
Author

Seems that issue with asconfig.json charset. Problem above happens only with Windows devices with UTF-8 charset for asconfig.json file.
UTF-8 BOM charset cause error:
Unrecognized token 'п': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') (line 1, column 2)

But with Windows-1251 charset all works fine. Copyright symbol correctly displayed.
So I will close this issue.
But charset changing didn't help with related issue #552.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants