fpereiro / gotoB

One .min.js to rule 'em all.
32 stars 2 forks source link

Document Unicode Errors #3

Closed yumaikas closed 3 years ago

yumaikas commented 4 years ago

So, unicode in attribute names is a bit of a minefield if one forgets to save the min.js file as UTF-8 on Windows, from what I can tell.

Saving it as UTF-8 with BOM in Sublime Text cleared up this error, but it might be worth adding it to the documentation, so that when other people hit it, it doesn't require them to dg into the code.

image

yumaikas commented 4 years ago

For what it's worth, I've only seen this show up in nested views, until the views are nested, this path doesn't seem to get triggered

fpereiro commented 4 years ago

Good point! It is actually necessary to specify an encoding, since gotoB uses non-ASCII characters. UTF-8 is recommended, but any other should work. I just added a note in the readme here, in the Installation section (https://github.com/fpereiro/gotoB/commit/b35a40dabc73ab7490ddd76ad0e43c7acf724969).

Please let me know if this solves the issue.

yumaikas commented 4 years ago

Next time I'm on my work machine (where the error came up), I'll try updating to 1.2.4 and using that utf-8 tag you mentioned. Like I said, on that machine, it was enough to re-save the file with a byte order mark. I'll try to work that out today.

fpereiro commented 3 years ago

HI @yumaikas ! I tested on several browsers and the <meta charset="utf-8"> tag seems to do the trick. If it doesn't, feel free to reopen the issue.

Thank you!