Forum How do I...?

French char problem

lmen1990
I have problem with French characters (running on Windows XP SP2)

p {
font-family: "Times New Roman", Times, serif;
}
...
<p>Tous droits réservés.</p>

I am getting error - "no glyphs for character U+9C2F, fallback to '?'"

I tried other fonts but I am getting the same error. I read UNICODE encoding from http://www.princexml.com/doc/6.0/characters/ but we have many contents containing French chars and it will be too much to rewrite.
mikeday
This sounds like an encoding problem in your XML or HTML document, as U+9C2F is a Chinese character, not a French character. Which encoding are you using? (eg. UTF-8, ISO-8859-1, Windows-1252, etc.) Is your document XML or HTML?
lmen1990
Yes, it is encoding issue and it works after changing from UTF-8 to ISO-8859-1 or Windows-1252.

However, I still have problem if French chars in CSS.

This works.
<body>
<p>Tous droits réservés.</p>
</body>

But this does not.
@bottom-left {
content: "Tous droits réservés.";
}

Is there something I need to do to let CSS know about encoding? I can work around by moving page footer content from CSS to HTML and then put it back to page footer by using flow.
lmen1990
I tried @charset in CSS but it did not help.

@charset "ISO-8859-1";
mikeday
At the moment, Prince can only read external CSS style sheets encoded with UTF-8. Style rules embedded within the document, such as in <style> elements or attributes, can use the document encoding, but external style sheets must be UTF-8. Sorry about that, we hope to support @charset in a future release.