EncodingType not set

Dec 1, 2010 at 6:50 PM

For some reason the combined file "js-bundle.min.js" is not encoded UTF8, although the individual files are encoded UTF8. Any ideas? Thanks!

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">
        AssemblyFile="Yahoo.Yui.Compressor.dll" />
    <!-- http://yuicompressor.codeplex.com/ -->
    <!-- The .NET 2.0 version of the task .. and yes .. that's Model.Net20 folder listed twice .. i know i know...
        AssemblyFile="..\..\Projects\Yahoo.Yui.Compressor\Model.Net20\Model.Net20\bin\Debug\Yahoo.Yui.Compressor.NET20.dll" />

    <!-- Define the output locations. These can be set via the msbuild command line using
         If they are not supplied or are empty, then we the value whatever is supplied, below.
        <CssOutputFile Condition=" '$(CssOutputFile)'=='' ">..\Content\css-bundle.min.css</CssOutputFile>
        <JavaScriptOutputFile Condition=" '$(JavaScriptOutputFile)'=='' ">..\Scripts\js-bundle.min.js</JavaScriptOutputFile>

    <Target Name="CompressJsAndCss">
            ItemGroup\CssFiles or ItemGroup\JavaScriptFiles: add zero to many files you wish to include in this compression task.
                                                             Don't forget, you can use the wildcard (eg. *.css, *.js) if you feel up to it.
                                                             Finally, at least one item is required - either a css file or a js file.
            CssFiles/JavaScriptFiles data format: Please do not touch this.
            DeleteCssFiles: [Optional] True | Yes | Yeah | Yep | True | FoSho | Fo Sho. Default is False. Anything else is False. (eg. blah = false, xxxx111 = false, etc)
            CssCompressionType: YuiStockCompression | MichaelAshsRegexEnhancements | HaveMyCakeAndEatIt or BestOfBothWorlds or Hybrid; Default is YuiStockCompression.
            ObfuscateJavaScript: [Optional] refer to DeleteCssFiles, above.
            PreserveAllSemicolons: [Optional] refer to DeleteCssFiles, above.
            DisableOptimizations: [Optional] refer to DeleteCssFiles, above.
            EncodingType: [Optional] ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, UTF8, Default. Default is 'Default'.
            DeleteJavaScriptFiles: [Optional] refer to DeleteCssFiles, above.
            LineBreakPosition: [Optional] the position where a line feed is appened when the next semicolon is reached. Default is -1 (never add a line break).
                               0 (zero) means add a line break after every semicolon. (This might help with debugging troublesome files).         
            LoggingType: None | ALittleBit | HardcoreBringItOn;  Hardcore also lists javascript verbose warnings, if there are any (and there usually is :P ).
            ThreadCulture: [Optional] the culture you want the thread to run under. Default is 'en-gb'.
            IsEvalIgnored: [Optional] compress any functions that contain 'eval'. Default is False, which means a function that contains
                           'eval' will NOT be compressed. It's deemed risky to compress a function containing 'eval'. That said,
                           if the usages are deemed safe this check can be disabled by setting this value to True.
            <!-- Single files, listed in order of dependency -->
            <CssFiles Include="..\Content\01-reset.debug.css"/>
            <CssFiles Include="..\Content\02-styles.debug.css"/>

            <JavaScriptFiles Include="..\Scripts\01-jquery.validate.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\02-jquery.validate.mvc.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\03-functions.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\04-jqprint.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\05-search.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\06-gmap.helpers.debug.js"/>
            <JavaScriptFiles Include="..\Scripts\07-unitpngfix.debug.js"/>

            <!-- All the files. They will be handled (I assume) in alphabetically. -->
            <!-- <CssFiles Include="$(SourceLocation)*.css" />
            <JavaScriptFiles Include="$(SourceLocation)*.js" />


Jan 17, 2011 at 11:31 PM

Hi gdycus, 

thanks heaps for giving YUICompressor a go :) In the (latest at the time of me posting this reply) release, I've done some more work on encoding stuff. Can you try the latest version and see if that helps, now?