1

I want to write in arabic on a primefaces tab.I use primefaces 1.1.

<p:tab title="الهوية" >

but it is displayed on the browser as tiles. Any solution plz.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
ANIS BOULILA
  • 71
  • 2
  • 10

2 Answers2

1

try adding the following to your page

    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
Daniel
  • 36,833
  • 10
  • 119
  • 200
1

but it is displayed on the browser as tiles

In other words, the font as used by the browser does not support those characters. The encoding is all fine, you would otherwise have seen Mojibake instead, something like as اÙÙÙÙØ© or even question marks as in ??????.

You need to change the default font used by your website to another one which has the best support for those characters in all client side platforms. For example, Arial or just Sans-Serif. You can do this in your default CSS stylesheet.

body {
    font-family: Arial, Sans-Serif;
}
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • it is a problem with the browser, it works with Firefox and does not work with chrome – ANIS BOULILA Jan 13 '12 at 14:02
  • Then Chrome doesn't support those glyphs in the font which it is been told by your website to use. As said, change the website's default font by CSS to another font which is most guaranteed to be supported in all browsers/environments, such as Arial. Once again, this is **not** an encoding problem. – BalusC Jan 13 '12 at 14:03
  • i maked font-family: Arial, Sans-Serif; but no change, i believe tha i must make change on the primefaces css jar – ANIS BOULILA Jan 13 '12 at 14:09
  • You need to specify a specific enough CSS selector for the given element. See also for example http://stackoverflow.com/questions/8768317/how-do-i-re-write-those-class-defined-in-primefaces-css – BalusC Jan 13 '12 at 14:10