I am generating Javascript files for a project. The code is saved in JS text files using UTF8. This code may contain strings containing characters with accents. These strings may be displayed in sections, thus I have html escaped them using StringEscapeUtils
from Apache Commons.
From here, I take that this practice is safe and sufficient for HTML documents using UTF8, but what about imported javascripts. Do they 'inherit' of the same format as the referencing html document?