Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-19 18:41:48

eworkflow
Member
Registered: 2009-09-19
Posts: 10

International fonts

When I access http://forum.textpattern.com/index.php I can see all international fonts displayed in the bottom area of the page.

However, using the same PC and browser, I am unable to see international fonts displayed on the Texpattern-Admin-Preferences-Language page of a TXP I installed on bluehost.com host.

What hosting-related parameter, or any other reason, would be most likely responsible for the above rendering discrepancy?

Offline

#2 2009-09-19 19:27:07

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: International fonts

Character encoding, I guess. My guess is that your server serves contents using 8859-1 while TXP does the same using UTF-8, hence the conflict. If you have the Firefox Web Developer Toolbar check under Information > View Response Headers and see what kind of Content-Type you get.

Offline

#3 2009-09-19 20:24:03

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

Thanks, Neko, for a fast reply.

Response headers for this forum page:

Date: Sat, 19 Sep 2009 20:15:28 GMT
Server: Apache
Expires: Thu, 21 Jul 1977 07:30:00 GMT
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Served-By: Joyent
Last-Modified: Sat, 19 Sep 2009 20:15:28 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 5008
Keep-Alive: timeout=3, max=80
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

200 OK

Response headers for the Textpattern in question:

Date: Sat, 19 Sep 2009 20:18:02 GMT
Server: Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635
X-Powered-By: PHP/4.4.9
Keep-Alive: timeout=10, max=30
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

200 OK

I can’t see any meaningful difference above.
I wonder if any coding-related DB or PHP parameter might be at fault here.

Offline

#4 2009-09-19 20:32:23

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

…on a second look, may “Vary: Accept-Encoding” line be the key difference here?

Offline

#5 2009-09-19 20:57:17

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: International fonts

No, that’s only interesting for proxy servers.
Can you post an URL to the website giving problems?

Offline

#6 2009-09-19 21:14:06

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

The page in question is a TXP admin panel page (Admin-Preferences-Language) which requires admin login to be visible.

Offline

#7 2009-09-19 22:06:16

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

Interestingly, a php info script, I run on my Bluehost, returns this output:

㔮㈮

I will contact Bluehost to comment. Thanks for all help.

Offline

#8 2009-09-20 03:15:30

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

Waiting for Bluehost feedback I have a feeling (!) that my remedy may lay in comment found on http://www.dyeager.org/blog/2008/10/getting-browser-default-language-php.html page:

“…if you’re sending different language-specific content at the same URL, be sure to send the appropriate Vary header. If you don’t, intermediate proxy caches might be confused and serve the wrong language to some people. To do that, just use the following first in your PHP code: header(“Vary: Accept-Language”).”

Is it possible that my problem relates to a Bluehost-based cache confusion?

Offline

#9 2009-09-20 12:02:34

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: International fonts

Nope. There’s a difference between language and character-set.

If you had an admin interface that would show in English, German, Dutch, French depending on the Accept-language header sent by the browser, using that Vary header would help fix the problem that a German user would see an Dutch admin page that was cached by the proxy.

In this case, there appears to be a mix-up of character sets for example the use of latin1 versus utf-8. Could be many things:
  • application (not likely, because it also happens in your phpinfo script which is separate from TXP)
  • server
  • proxy
  • client (try a different browser!)

Offline

#10 2009-09-20 17:26:05

eworkflow
Member
Registered: 2009-09-19
Posts: 10

Re: International fonts

I actually tried 3 different computers with 3 different OS and about 10 browsers – all render the same wrong fonts for TXP Language panel.
So, as I follow you, all roads lead to Bluehost, which is expected since I don’t observe any other font rendering problem on my side on any other host.

This problem, although apparently not a common one, is a deal-breaker for me since I need to administer English, French and Arabic content for my non-profit client. When resolved, however, it will result in my Paypal contribution to TXP because it is a gem nevertheless.

Offline

Board footer

Powered by FluxBB