You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Bertrand Guay-Paquet <be...@step.polymtl.ca> on 2012/01/09 15:53:17 UTC

Re: hebrew text looks like ×׳—׳‘׳¨׳ •

After some research, I'm now using the following html "header" :
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<head>
<meta charset="UTF-8">

[xmlns:wicket="http://wicket.apache.org"] is stripped by Wicket when 
pages are rendered by default. This header does not trigger quirks mode 
and is valid for html5, which also works for html4 content.

Please correct me if this header is wrong for some reason.

Regards,
Bertrand

On 09/01/2012 7:52 AM, Richard W. Adams wrote:
> HTML files should not have have an XML header. Only XHTML files should.
>
>
>
> From:   armhold<ar...@gmail.com>
> To:     users@wicket.apache.org
> Date:   01/06/2012 08:31 PM
> Subject:        Re: hebrew text looks like ×׳—׳‘׳¨׳•
>
>
>
> I went though this pain a few months ago too. Here are all the places I
> had
> to hit:
>
> 1. In your HTML files:
>
>      <?xml version="1.0" encoding="UTF-8"?>
>
> And also in your<head>:
>
>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>
> 2. For property files, if you use i18n you will need to use the foo.xml
> format rather than foo.properties, and also include the above<?xml
> version="1.0" encoding="UTF-8"?>  in each of them.
>
> 3. In your WicketApplication.java:
>
>      // wicket 1.4; perhaps different in 1.5
>      getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
>      getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
>
> 4. In your pom.xml (to cover any copied resources):
>
>      <properties>
>          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>      </properties>
>
> 5. Finally, in Intellij:
>
>      File ->  Preferences ->  File Encodings ->  IDE Encoding: UTF-8.
>
>
> What made this frustrating is that it always seemed to render fine with
> the
> embedded Jetty, but not with Tomcat (so things would always look great
> locally, but fall apart in production).
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4271694.html
>
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> **
>
> This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
> **

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: hebrew text looks like ×׳—׳‘׳¨׳ •

Posted by Bertrand Guay-Paquet <be...@step.polymtl.ca>.
Yes this is good advice. I actually use the html header + 
setDefaultMarkupEncoding().

On 09/01/2012 1:36 PM, Sven Meier wrote:
> Hi,
>
> the header is ok, but Wicket's xml parser won't be able to infer the 
> encoding.
>
> Use IMarkupSettings#setDefaultMarkupEncoding() as Martin has suggested.
>
> Regards
> Sven
>
> On 01/09/2012 03:53 PM, Bertrand Guay-Paquet wrote:
>> After some research, I'm now using the following html "header" :
>> <!DOCTYPE html>
>> <html xmlns:wicket="http://wicket.apache.org">
>> <head>
>> <meta charset="UTF-8">
>>
>> [xmlns:wicket="http://wicket.apache.org"] is stripped by Wicket when 
>> pages are rendered by default. This header does not trigger quirks 
>> mode and is valid for html5, which also works for html4 content.
>>
>> Please correct me if this header is wrong for some reason.
>>
>> Regards,
>> Bertrand
>>
>> On 09/01/2012 7:52 AM, Richard W. Adams wrote:
>>> HTML files should not have have an XML header. Only XHTML files should.
>>>
>>>
>>>
>>> From:   armhold<ar...@gmail.com>
>>> To:     users@wicket.apache.org
>>> Date:   01/06/2012 08:31 PM
>>> Subject:        Re: hebrew text looks like ×׳—׳‘׳¨׳•
>>>
>>>
>>>
>>> I went though this pain a few months ago too. Here are all the places I
>>> had
>>> to hit:
>>>
>>> 1. In your HTML files:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> And also in your<head>:
>>>
>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>>
>>> 2. For property files, if you use i18n you will need to use the foo.xml
>>> format rather than foo.properties, and also include the above<?xml
>>> version="1.0" encoding="UTF-8"?>  in each of them.
>>>
>>> 3. In your WicketApplication.java:
>>>
>>>      // wicket 1.4; perhaps different in 1.5
>>>      getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
>>>      getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
>>>
>>> 4. In your pom.xml (to cover any copied resources):
>>>
>>> <properties>
>>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>> </properties>
>>>
>>> 5. Finally, in Intellij:
>>>
>>>      File ->  Preferences ->  File Encodings ->  IDE Encoding: UTF-8.
>>>
>>>
>>> What made this frustrating is that it always seemed to render fine with
>>> the
>>> embedded Jetty, but not with Tomcat (so things would always look great
>>> locally, but fall apart in production).
>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4271694.html 
>>>
>>>
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>
>>> **
>>>
>>> This email and any attachments may contain information that is 
>>> confidential and/or privileged for the sole use of the intended 
>>> recipient.  Any use, review, disclosure, copying, distribution or 
>>> reliance by others, and any forwarding of this email or its 
>>> contents, without the express permission of the sender is strictly 
>>> prohibited by law.  If you are not the intended recipient, please 
>>> contact the sender immediately, delete the e-mail and destroy all 
>>> copies.
>>> **
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: hebrew text looks like ×׳—׳‘׳¨׳ •

Posted by Sven Meier <sv...@meiers.net>.
Hi,

the header is ok, but Wicket's xml parser won't be able to infer the 
encoding.

Use IMarkupSettings#setDefaultMarkupEncoding() as Martin has suggested.

Regards
Sven

On 01/09/2012 03:53 PM, Bertrand Guay-Paquet wrote:
> After some research, I'm now using the following html "header" :
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> <head>
> <meta charset="UTF-8">
>
> [xmlns:wicket="http://wicket.apache.org"] is stripped by Wicket when 
> pages are rendered by default. This header does not trigger quirks 
> mode and is valid for html5, which also works for html4 content.
>
> Please correct me if this header is wrong for some reason.
>
> Regards,
> Bertrand
>
> On 09/01/2012 7:52 AM, Richard W. Adams wrote:
>> HTML files should not have have an XML header. Only XHTML files should.
>>
>>
>>
>> From:   armhold<ar...@gmail.com>
>> To:     users@wicket.apache.org
>> Date:   01/06/2012 08:31 PM
>> Subject:        Re: hebrew text looks like ×׳—׳‘׳¨׳•
>>
>>
>>
>> I went though this pain a few months ago too. Here are all the places I
>> had
>> to hit:
>>
>> 1. In your HTML files:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> And also in your<head>:
>>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>
>> 2. For property files, if you use i18n you will need to use the foo.xml
>> format rather than foo.properties, and also include the above<?xml
>> version="1.0" encoding="UTF-8"?>  in each of them.
>>
>> 3. In your WicketApplication.java:
>>
>>      // wicket 1.4; perhaps different in 1.5
>>      getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
>>      getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
>>
>> 4. In your pom.xml (to cover any copied resources):
>>
>> <properties>
>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>> </properties>
>>
>> 5. Finally, in Intellij:
>>
>>      File ->  Preferences ->  File Encodings ->  IDE Encoding: UTF-8.
>>
>>
>> What made this frustrating is that it always seemed to render fine with
>> the
>> embedded Jetty, but not with Tomcat (so things would always look great
>> locally, but fall apart in production).
>>
>>
>> -- 
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4271694.html 
>>
>>
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>> **
>>
>> This email and any attachments may contain information that is 
>> confidential and/or privileged for the sole use of the intended 
>> recipient.  Any use, review, disclosure, copying, distribution or 
>> reliance by others, and any forwarding of this email or its contents, 
>> without the express permission of the sender is strictly prohibited 
>> by law.  If you are not the intended recipient, please contact the 
>> sender immediately, delete the e-mail and destroy all copies.
>> **
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org