@@ -70,7 +70,7 @@ gulp.task('validateTranslationFiles', (done) => {
7070 glob . sync ( 'package.nls.*.json' , { sync : true } ) . forEach ( ( file ) => {
7171 // Verify we can open and parse as JSON.
7272 try {
73- const js = JSON . parse ( fs . readFileSync ( file ) ) ;
73+ const js = JSON . parse ( fs . readFileSync ( file , 'utf-8' ) ) ;
7474 const result = validator . validate ( js , schema ) ;
7575 if ( Array . isArray ( result . errors ) && result . errors . length ) {
7676 console . error ( result . errors ) ;
@@ -271,17 +271,17 @@ gulp.task('validateTelemetry', async () => {
271271
272272gulp . task ( 'validatePackageLockJson' , async ( ) => {
273273 const fileName = path . join ( __dirname , 'package-lock.json' ) ;
274- const oldContents = fs . readFileSync ( fileName ) . toString ( ) ;
274+ const oldContents = fs . readFileSync ( fileName , 'utf-8' ) ;
275275 spawnSync ( 'npm' , [ 'install' , '--prefer-offline' ] ) ;
276- const newContents = fs . readFileSync ( fileName ) . toString ( ) ;
276+ const newContents = fs . readFileSync ( fileName , 'utf-8' ) ;
277277 if ( oldContents . trim ( ) !== newContents . trim ( ) ) {
278278 throw new Error ( 'package-lock.json has changed after running `npm install`' ) ;
279279 }
280280} ) ;
281281
282282gulp . task ( 'verifyUnhandledErrors' , async ( ) => {
283283 const fileName = path . join ( __dirname , 'unhandledErrors.txt' ) ;
284- const contents = fs . pathExistsSync ( fileName ) ? fs . readFileSync ( fileName , 'utf8 ' ) : '' ;
284+ const contents = fs . pathExistsSync ( fileName ) ? fs . readFileSync ( fileName , 'utf-8 ' ) : '' ;
285285 if ( contents . trim ( ) . length ) {
286286 console . error ( contents ) ;
287287 throw new Error ( 'Unhandled errors detected. Please fix them before merging this PR.' , contents ) ;
0 commit comments