[
https://issues.apache.org/jira/browse/CB-11241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297922#comment-15297922
]
Vladimir Kotikov commented on CB-11241:
---------------------------------------
[~nikhilkh], the change was made in order to keep the order of operations
(prepare -> 'pre_package hook' -> 'bomify' -> build) after adding simulation
for pre_package hook [here|https://github.com/apache/cordova-lib/pull/356].
Since 'prepare' functionality is now offered by platform and platform is not
aware of hooks functionality, the only chance to insert 'pre_package' hook
before adding BOM signatures was to move this functionality to 'build' module
and call it right before build stage.
Although there were a recommendations to make this change, I personally don't
think that it was really necessary - [a quick search on
Github|https://github.com/search?l=xml&p=1&q=pre_package&type=Code&utf8=%E2%9C%93]
shows that 'pre_package' hook mostly used for things, different than changing
files inside 'www' and hence there is no big difference in firing it before or
after BOM has added to 'www' files.
So IMO [this change|https://github.com/apache/cordova-windows/pull/134] to
Windows platform can be reverted to restore the original behavior of 'prepare'
command.
Thoughts?
> File encoding test fails with UTF-8 file encoding error on windows store
> submission
> -----------------------------------------------------------------------------------
>
> Key: CB-11241
> URL: https://issues.apache.org/jira/browse/CB-11241
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib, Windows
> Affects Versions: 6.1.1
> Reporter: Michael Schmidt
> Labels: cannot-reproduce, triaged, wfc
>
> File encoding test
> ```
> FAILED
> UTF-8 file encoding
> Error Found: The UTF-8 file encoding test detected the following errors:
> File www\cordova_plugins.js is not properly UTF-8 encoded. Re-save the file
> as UTF-8 (including Byte Order Mark).
> File www\cordova-js-src\exec.js is not properly UTF-8 encoded. Re-save the
> file as UTF-8 (including Byte Order Mark).
> File www\cordova-js-src\platform.js is not properly UTF-8 encoded. Re-save
> the file as UTF-8 (including Byte Order Mark).
> File www\js\app.js is not properly UTF-8 encoded. Re-save the file as UTF-8
> (including Byte Order Mark).
> File www\js\libs.js is not properly UTF-8 encoded. Re-save the file as UTF-8
> (including Byte Order Mark).
> File www\plugins\cordova-plugin-console\www\console-via-logger.js is not
> properly UTF-8 encoded. Re-save the file as UTF-8 (including Byte Order Mark).
> ...
> Impact if not fixed: HTML, CSS, and JavaScript files must be encoded in UTF-8
> form with a corresponding byte-order mark (BOM) in order to benefit from
> bytecode caching and to avoid other runtime error conditions.
> How to fix: Open the affected file, and select "Save As..." option from the
> File menu in Visual Studio. Select the drop-down control next to the Save
> button and select "Save with Encoding..." option. From the Advanced save
> options dialog, choose the "Unicode (UTF-8 with signature)" option and click
> the OK button.
> ````
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]