vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

Copyright symbol in compile constants values return incorrect String

Open itlancer opened this issue 4 years ago • 3 comments

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: https://github.com/BowlerHatLLC/vscode-as3mxml/issues/552

itlancer avatar Sep 09 '21 13:09 itlancer

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

joshtynjala avatar Sep 09 '21 20:09 joshtynjala

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

itlancer avatar Sep 10 '21 14:09 itlancer

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.

joshtynjala avatar Sep 10 '21 15:09 joshtynjala

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 https://github.com/BowlerHatLLC/vscode-as3mxml/issues/552.

itlancer avatar Aug 17 '22 11:08 itlancer