Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Konrad Windszus
I guess AddDefaultEncoding is just not allowed in the .htaccess file. So we 
could either ask INFRA to set that globally for the Sling Website or rely on 
the meta tag http-equiv like Apache Ant is doing: http://ant.apache.org/. That 
would also have the advantage that the local preview would work as well!
IMHO we should just adjust the template to include the according meta tag.

> On 12. Oct 2017, at 13:50, Konrad Windszus  wrote:
> 
> According to https://reference.apache.org/committer/website there should be a 
> .revision file at the root of the site, but I couldn't find it.
> So most probably you have to open an INFRA ticket to ask why the change in 
> .htaccess is not having any effect.
> Konrad
> 
>> On 12. Oct 2017, at 13:20, Julian Sedding  wrote:
>> 
>> I expected my change to cause the Content-Type header of HTML pages
>> being set to "text/html;charset=utf-8", which is not (yet) the case.
>> DO we have any way to know if a change has made it to the live site,
>> or looking at what Apache httpd is doing with out .htacess file?
>> 
>> @Konrad: I also saw the template encoding option for jbake, but
>> figured that was probably not the problem.
>> 
>> Regards
>> Julian
>> 
>> On Thu, Oct 12, 2017 at 12:08 PM, Konrad Windszus  wrote:
>>> I would also be in very strong favour of not using strange escape sequences 
>>> and instead directly use UTF-8 sources.
>>> I guess the default encoding for the templates is anyhow UTF-8, but we can 
>>> also set that explicitly 
>>> (http://jbake.org/docs/2.4.0/#default_encoding_for_templates).
>>> 
>>> If we are really afraid that those characters are messed up by editors 
>>> which assume the wrong encoding, we can enforce the encoding with 
>>> http://www.mojohaus.org/extra-enforcer-rules/requireEncoding.html.
>>> 
>>> But I strongly agree with Julian, it is 2017 and being restricted to 
>>> US-ASCII with long escape sequences feels weird.
>>> Therefore +1 for WYSYWYG and UTF-8 for the templates (with the additional 
>>> safety net of the extra-enforcer-rules).
>>> 
>>> Konrad
>>> 
 On 12. Oct 2017, at 08:21, Julian Sedding  wrote:
 
 Hi Bertrand
 
 Fair enough, I'll leave the template as-is. Personally, I prefer UTF-8
 across the whole stack, in good old WYSIWYG manner ;)
 
 I have pushed a change only to .htaccess now.
 
 Regards
 Julian
 
 On Wed, Oct 11, 2017 at 2:29 PM, Bertrand Delacretaz
  wrote:
> Hi Julian,
> 
> On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  
> wrote:
>> ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
>> .htaccess instead
> 
> IMO it's better to avoid unicode chars in code, and those templates
> are code so my preference is to keep \u00a9 for the copyright sign.
> Encoding issues can also show up when editing files so better safe
> than sorry.
> 
> That being said, if you can add encoding settings in the right places
> like .htaccess that's fantastic! I just prefer keeping the code as is
> - belt and suspenders maybe ;-)
> 
> -Bertrand
>>> 
> 



Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Konrad Windszus
According to https://reference.apache.org/committer/website there should be a 
.revision file at the root of the site, but I couldn't find it.
So most probably you have to open an INFRA ticket to ask why the change in 
.htaccess is not having any effect.
Konrad

> On 12. Oct 2017, at 13:20, Julian Sedding  wrote:
> 
> I expected my change to cause the Content-Type header of HTML pages
> being set to "text/html;charset=utf-8", which is not (yet) the case.
> DO we have any way to know if a change has made it to the live site,
> or looking at what Apache httpd is doing with out .htacess file?
> 
> @Konrad: I also saw the template encoding option for jbake, but
> figured that was probably not the problem.
> 
> Regards
> Julian
> 
> On Thu, Oct 12, 2017 at 12:08 PM, Konrad Windszus  wrote:
>> I would also be in very strong favour of not using strange escape sequences 
>> and instead directly use UTF-8 sources.
>> I guess the default encoding for the templates is anyhow UTF-8, but we can 
>> also set that explicitly 
>> (http://jbake.org/docs/2.4.0/#default_encoding_for_templates).
>> 
>> If we are really afraid that those characters are messed up by editors which 
>> assume the wrong encoding, we can enforce the encoding with 
>> http://www.mojohaus.org/extra-enforcer-rules/requireEncoding.html.
>> 
>> But I strongly agree with Julian, it is 2017 and being restricted to 
>> US-ASCII with long escape sequences feels weird.
>> Therefore +1 for WYSYWYG and UTF-8 for the templates (with the additional 
>> safety net of the extra-enforcer-rules).
>> 
>> Konrad
>> 
>>> On 12. Oct 2017, at 08:21, Julian Sedding  wrote:
>>> 
>>> Hi Bertrand
>>> 
>>> Fair enough, I'll leave the template as-is. Personally, I prefer UTF-8
>>> across the whole stack, in good old WYSIWYG manner ;)
>>> 
>>> I have pushed a change only to .htaccess now.
>>> 
>>> Regards
>>> Julian
>>> 
>>> On Wed, Oct 11, 2017 at 2:29 PM, Bertrand Delacretaz
>>>  wrote:
 Hi Julian,
 
 On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  wrote:
> ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
> .htaccess instead
 
 IMO it's better to avoid unicode chars in code, and those templates
 are code so my preference is to keep \u00a9 for the copyright sign.
 Encoding issues can also show up when editing files so better safe
 than sorry.
 
 That being said, if you can add encoding settings in the right places
 like .htaccess that's fantastic! I just prefer keeping the code as is
 - belt and suspenders maybe ;-)
 
 -Bertrand
>> 



Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Bertrand Delacretaz
On Thu, Oct 12, 2017 at 12:08 PM, Konrad Windszus  wrote:
> ...If we are really afraid that those characters are messed up by editors 
> which assume the wrong encoding, we can
> enforce the encoding with 
> http://www.mojohaus.org/extra-enforcer-rules/requireEncoding.html

That would work for me.

IMO the goal is to avoid stray changes like the ones of
https://github.com/apache/sling-site/commit/6d369ed6455fd88f82c7c7648dd4b65b47f7f8ab
where the copyright symbol got messed up.

-Bertrand


Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Julian Sedding
I expected my change to cause the Content-Type header of HTML pages
being set to "text/html;charset=utf-8", which is not (yet) the case.
DO we have any way to know if a change has made it to the live site,
or looking at what Apache httpd is doing with out .htacess file?

@Konrad: I also saw the template encoding option for jbake, but
figured that was probably not the problem.

Regards
Julian

On Thu, Oct 12, 2017 at 12:08 PM, Konrad Windszus  wrote:
> I would also be in very strong favour of not using strange escape sequences 
> and instead directly use UTF-8 sources.
> I guess the default encoding for the templates is anyhow UTF-8, but we can 
> also set that explicitly 
> (http://jbake.org/docs/2.4.0/#default_encoding_for_templates).
>
> If we are really afraid that those characters are messed up by editors which 
> assume the wrong encoding, we can enforce the encoding with 
> http://www.mojohaus.org/extra-enforcer-rules/requireEncoding.html.
>
> But I strongly agree with Julian, it is 2017 and being restricted to US-ASCII 
> with long escape sequences feels weird.
> Therefore +1 for WYSYWYG and UTF-8 for the templates (with the additional 
> safety net of the extra-enforcer-rules).
>
> Konrad
>
>> On 12. Oct 2017, at 08:21, Julian Sedding  wrote:
>>
>> Hi Bertrand
>>
>> Fair enough, I'll leave the template as-is. Personally, I prefer UTF-8
>> across the whole stack, in good old WYSIWYG manner ;)
>>
>> I have pushed a change only to .htaccess now.
>>
>> Regards
>> Julian
>>
>> On Wed, Oct 11, 2017 at 2:29 PM, Bertrand Delacretaz
>>  wrote:
>>> Hi Julian,
>>>
>>> On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  wrote:
 ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
 .htaccess instead
>>>
>>> IMO it's better to avoid unicode chars in code, and those templates
>>> are code so my preference is to keep \u00a9 for the copyright sign.
>>> Encoding issues can also show up when editing files so better safe
>>> than sorry.
>>>
>>> That being said, if you can add encoding settings in the right places
>>> like .htaccess that's fantastic! I just prefer keeping the code as is
>>> - belt and suspenders maybe ;-)
>>>
>>> -Bertrand
>


Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Konrad Windszus
I would also be in very strong favour of not using strange escape sequences and 
instead directly use UTF-8 sources.
I guess the default encoding for the templates is anyhow UTF-8, but we can also 
set that explicitly 
(http://jbake.org/docs/2.4.0/#default_encoding_for_templates).

If we are really afraid that those characters are messed up by editors which 
assume the wrong encoding, we can enforce the encoding with 
http://www.mojohaus.org/extra-enforcer-rules/requireEncoding.html.

But I strongly agree with Julian, it is 2017 and being restricted to US-ASCII 
with long escape sequences feels weird.
Therefore +1 for WYSYWYG and UTF-8 for the templates (with the additional 
safety net of the extra-enforcer-rules).

Konrad

> On 12. Oct 2017, at 08:21, Julian Sedding  wrote:
> 
> Hi Bertrand
> 
> Fair enough, I'll leave the template as-is. Personally, I prefer UTF-8
> across the whole stack, in good old WYSIWYG manner ;)
> 
> I have pushed a change only to .htaccess now.
> 
> Regards
> Julian
> 
> On Wed, Oct 11, 2017 at 2:29 PM, Bertrand Delacretaz
>  wrote:
>> Hi Julian,
>> 
>> On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  wrote:
>>> ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
>>> .htaccess instead
>> 
>> IMO it's better to avoid unicode chars in code, and those templates
>> are code so my preference is to keep \u00a9 for the copyright sign.
>> Encoding issues can also show up when editing files so better safe
>> than sorry.
>> 
>> That being said, if you can add encoding settings in the right places
>> like .htaccess that's fantastic! I just prefer keeping the code as is
>> - belt and suspenders maybe ;-)
>> 
>> -Bertrand



Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-12 Thread Julian Sedding
Hi Bertrand

Fair enough, I'll leave the template as-is. Personally, I prefer UTF-8
across the whole stack, in good old WYSIWYG manner ;)

I have pushed a change only to .htaccess now.

Regards
Julian

On Wed, Oct 11, 2017 at 2:29 PM, Bertrand Delacretaz
 wrote:
> Hi Julian,
>
> On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  wrote:
>> ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
>> .htaccess instead
>
> IMO it's better to avoid unicode chars in code, and those templates
> are code so my preference is to keep \u00a9 for the copyright sign.
> Encoding issues can also show up when editing files so better safe
> than sorry.
>
> That being said, if you can add encoding settings in the right places
> like .htaccess that's fantastic! I just prefer keeping the code as is
> - belt and suspenders maybe ;-)
>
> -Bertrand


Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-11 Thread Bertrand Delacretaz
Hi Julian,

On Wed, Oct 11, 2017 at 1:26 PM, Julian Sedding  wrote:
> ...I'll try reverting this fix and set AddDefaultCharset utf-8 in
> .htaccess instead

IMO it's better to avoid unicode chars in code, and those templates
are code so my preference is to keep \u00a9 for the copyright sign.
Encoding issues can also show up when editing files so better safe
than sorry.

That being said, if you can add encoding settings in the right places
like .htaccess that's fantastic! I just prefer keeping the code as is
- belt and suspenders maybe ;-)

-Bertrand


Re: [sling-site] branch master updated: Avoid encoding issues

2017-10-11 Thread Julian Sedding
Hi Bertrand

I'll try reverting this fix and set AddDefaultCharset utf-8 in
.htaccess instead. I believe that will be more convenient down the
road (if it works).

Regards
Julian


On Tue, Oct 10, 2017 at 11:51 AM,   wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> bdelacretaz pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/sling-site.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>  new 7fb315a  Avoid encoding issues
> 7fb315a is described below
>
> commit 7fb315ad7ac1edffc6e983fb5dcd9840097f3aef
> Author: Bertrand Delacretaz 
> AuthorDate: Tue Oct 10 11:51:13 2017 +0200
>
> Avoid encoding issues
> ---
>  src/main/jbake/templates/footer.tpl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/main/jbake/templates/footer.tpl 
> b/src/main/jbake/templates/footer.tpl
> index 555c601..d6cf40f 100644
> --- a/src/main/jbake/templates/footer.tpl
> +++ b/src/main/jbake/templates/footer.tpl
> @@ -4,5 +4,5 @@ p() {
>  yield "may be trademarks or registered trademarks of their respective 
> owners."
>  }
>  p() {
> -yield "Copyright © 2011-2017 The Apache Software Foundation."
> +yield "Copyright \u00a9 2011-2017 The Apache Software Foundation."
>  }
>
> --
> To stop receiving notification emails like this one, please contact
> ['"comm...@sling.apache.org" '].