Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-09-03 09:53:26

testdeputy
Member
Registered: 2011-05-29
Posts: 29

à showing as �

Why o why is the character à not displayed correctly, but as �?
Other characters, like á, ä, è, é, ë, ù, ú, ü etc. are all displayed OK.
The config file says $txpcfg[‘dbcharset’] = ‘utf8’;
The database says DEFAULT CHARSET=utf8, it’s stored as à.
The HTML declaration says <!doctype html><html lang=en><head><meta charset=utf-8> etc.
The source html shows � where à should be, so it’s not that the browser can’t display à.

It seems that somewhere in the Txp processing the character à turns into a � …
Title, Body, custom field, they all have this behaviour.

Oh, [edit] forgotten: À (capital à) displays OK!

Last edited by testdeputy (2011-09-03 10:02:53)

Offline

#2 2011-09-03 10:03:44

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

Re: à showing as �

Please post your full diagnostics.
Did it display properly before?
What changed?

Offline

#3 2011-09-03 10:57:10

testdeputy
Member
Registered: 2011-05-29
Posts: 29

Re: à showing as �

What do you mean by ‘full diagnostics’?
It never displayed OK.
Nothing changed..

Thx for looking into this.

Offline

#4 2011-09-03 11:28:03

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: à showing as �

See Admin > Diagnostics, then at the bottom of that you will see a link with “Detail: low”. Select “High”, and then post the results (without details of your server).

Last edited by jstubbs (2011-09-03 11:30:07)

Offline

#5 2011-09-03 11:43:52

testdeputy
Member
Registered: 2011-05-29
Posts: 29

Re: à showing as �

Here goes, diagnostics..

Textpattern version: 4.4.1 (r3575)
Last Update: 2011-08-26 10:18:22/2011-06-17 21:17:14
Document root: /Library/WebServer/Documents
$path_to_site: /Library/WebServer/Documents/mysite
Textpattern path: /Library/WebServer/Documents/mysite/textpattern
Permanent link mode: title_only
Temporary directory path: /private/var/tmp
Site URL: 192.168.1.2/mysite
PHP version: 5.3.6
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server TZ: Europe/Amsterdam
Server Local Time: 2011-09-03 13:38:39
DST enabled?: 1
Automatically adjust DST setting?: 1
Time Zone: Europe/Amsterdam (3600)
MySQL: 5.1.41
Locale: en_US.UTF-8
Server: Apache/2.2.19 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch
Apache version: Apache/2.2.19 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Darwin 11.1.0
Active plugins: rvm_privileged-0.4, pat_speeder-0.4.cm, ied_plugin_composer-0.93m
Admin-side theme: phwiw 4.4.1

Pre-flight check:
————————————
Web Domain DNS lookup fails: 192.168.1.2
File directory path is not writable: /Library/WebServer/Documents/mysite/files
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

————————————

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: utf8
character_set_filesystem: binary
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/local/mysql-5.1.41-osx10.5-x86/share/charsets/
17 Tables: OK

10 Custom Fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)

PHP extensions: Core/5.3.6, date/5.3.6, ereg, libxml, openssl, pcre, sqlite3/0.7-dev, zlib/1.1, bcmath, bz2, calendar, ctype, curl, dba, dom/20031129, hash/1.0, fileinfo/1.0.5-dev, filter/0.11.0, ftp, gd, SPL/0.2, iconv, json/1.2.1, ldap, mbstring, session, standard/5.3.6, mysqlnd/mysqlnd 5.0.8-dev – 20102224 – $Revision: 308673 $, odbc/1.0, mysqli/0.1, PDO/1.0.4dev, pdo_mysql/1.0.2, pdo_pgsql/1.0.2, pdo_sqlite/1.0.1, pgsql, Phar/2.0.1, posix, Reflection/$Revision: 307971 $, mysql/1.0, shmop, SimpleXML/0.1, snmp, soap, sockets, SQLite/2.0-dev, exif/1.4 $Id: exif.c 308362 2011-02-15 14:02:26Z pajoye $, sysvmsg, sysvsem, sysvshm, tidy/2.0, tokenizer/0.1, wddx, xml, xmlreader/0.1, xmlrpc/0.51, xmlwriter/0.1, xsl/0.1, zip/1.9.1, apache2handler

Apache modules: core, prefork, http_core, mod_so, mod_authn_file, mod_authz_host, mod_cache, mod_disk_cache, mod_dumpio, mod_reqtimeout, mod_ext_filter, mod_include, mod_filter, mod_substitute, mod_deflate, mod_log_config, mod_log_forensic, mod_logio, mod_env, mod_mime_magic, mod_cern_meta, mod_expires, mod_headers, mod_ident, mod_usertrack, mod_setenvif, mod_version, mod_proxy, mod_proxy_http, mod_proxy_scgi, mod_proxy_balancer, mod_mime, mod_dav, mod_autoindex, mod_asis, mod_info, mod_cgi, mod_dav_fs, mod_vhost_alias, mod_negotiation, mod_dir, mod_imagemap, mod_actions, mod_speling, mod_alias, mod_rewrite, mod_php5, mod_userdir_apple, mod_bonjour2, mod_authn_dbm, mod_authn_anon, mod_authn_dbd, mod_authn_default, mod_auth_basic, mod_auth_digest, mod_authz_groupfile, mod_authz_user, mod_authz_dbm, mod_authz_owner, mod_authz_default, mod_mem_cache, mod_dbd, mod_proxy_connect, mod_proxy_ftp, mod_proxy_ajp, mod_status

pretext_data: array ( ‘id’ => ‘’, ‘s’ => ‘’, ‘c’ => ‘’, ‘context’ => ‘’, ‘q’ => ‘’, ‘m’ => ‘’, ‘pg’ => ‘’, ‘p’ => ‘’, ‘month’ => ‘’, ‘author’ => ‘’, ‘request_uri’ => ‘/mysite/5908b856fd30003622f29fbfbd0b30b4/?txpcleantest=1’, ‘qs’ => ‘txpcleantest=1’, ‘subpath’ => ‘\\/mysite\\/’, ‘req’ => ‘/5908b856fd30003622f29fbfbd0b30b4/?txpcleantest=1’,
)

/Library/WebServer/Documents/mysite/index.php: r3189 (5dfca604bf4976675f92222dd5628b0a)
/Library/WebServer/Documents/mysite/css.php: r3189 (b53deffeb21070b8d493af6846db8ac3)
/Library/WebServer/Documents/mysite/textpattern/css.php: r3189 (820df954c923979eabace541888feb4a)
/Library/WebServer/Documents/mysite/textpattern/include/import/import_b2.php: r3446 (7a044ad474fd04ae61063d0df15e05d8)
/Library/WebServer/Documents/mysite/textpattern/include/import/import_blogger.php: r3446 (4eade881581bd9932f05a7ff6e2a6e1f)
/Library/WebServer/Documents/mysite/textpattern/include/import/import_mt.php: r3446 (f0ab362246e60f37d3c52ef3f004e79d)
/Library/WebServer/Documents/mysite/textpattern/include/import/import_mtdb.php: r3488 (22628f6ba8d15645498ba09eb48bab32)
/Library/WebServer/Documents/mysite/textpattern/include/import/import_wp.php: r3488 (977d7be6fad569982ad175225e8e4df5)
/Library/WebServer/Documents/mysite/textpattern/include/txp_admin.php: r3570 (7925fc6a6c15f944ab255a0a7e239dab)
/Library/WebServer/Documents/mysite/textpattern/include/txp_article.php: r3560 (c12a042e5f56efeb4f5af57be4d42023)
/Library/WebServer/Documents/mysite/textpattern/include/txp_auth.php: r3571 (606de572670619f300cb5f3026d5a712)
/Library/WebServer/Documents/mysite/textpattern/include/txp_category.php: r3534 (37ecab71b01c146dd58da97d9b5c6439)
/Library/WebServer/Documents/mysite/textpattern/include/txp_css.php: r3535 (8cbc6b0e164b1cb790bea0264e867915)
/Library/WebServer/Documents/mysite/textpattern/include/txp_diag.php: r3521 (fac584135850fcae546cb8c59bf94688)
/Library/WebServer/Documents/mysite/textpattern/include/txp_discuss.php: r3569 (9e1d3b6ab40fde25a41d192e5f573ef7)
/Library/WebServer/Documents/mysite/textpattern/include/txp_file.php: r3569 (a1848e934804174886ae3b57d418ebd2)
/Library/WebServer/Documents/mysite/textpattern/include/txp_form.php: r3560 (06f2ddc008dbc82ce8d50af615f5f1a0)
/Library/WebServer/Documents/mysite/textpattern/include/txp_image.php: r3569 (a77c218d6db978157ec9f289d561cd33)
/Library/WebServer/Documents/mysite/textpattern/include/txp_import.php: r3556 (f8187a926ca6a379c1b0dd79fc194bec)
/Library/WebServer/Documents/mysite/textpattern/include/txp_link.php: r3569 (412a2382de98901a535548e5cf2def96)
/Library/WebServer/Documents/mysite/textpattern/include/txp_list.php: r3569 (91d67b3a1576a5dee3a128a03cdf9f04)
/Library/WebServer/Documents/mysite/textpattern/include/txp_log.php: r3569 (fd8cd943143eb3537074563625521033)
/Library/WebServer/Documents/mysite/textpattern/include/txp_page.php: r3560 (180b3a6b8669add7dab51a67ec76f89b)
/Library/WebServer/Documents/mysite/textpattern/include/txp_plugin.php: r3551 (51152310c17015cf906fb26ddaa68275)
/Library/WebServer/Documents/mysite/textpattern/include/txp_prefs.php: r3555 (6e844f30b97b1454c3d201914a2464a9)
/Library/WebServer/Documents/mysite/textpattern/include/txp_section.php: r3552 (89aacca63f7afc9fe28dc111cb61fa5d)
/Library/WebServer/Documents/mysite/textpattern/include/txp_tag.php: r3560 (d22e90318bd6fdf006198ebd33c5e6b3)
/Library/WebServer/Documents/mysite/textpattern/index.php: r3575 (c2c7bf18468d74254c77570a9573b46b)
/Library/WebServer/Documents/mysite/textpattern/jquery.js: unknown (a34f78c3aecd182144818eb4b7303fda)
/Library/WebServer/Documents/mysite/textpattern/lib/IXRClass.php: r3394 (e0b53564e1504316b35872309780edab)
/Library/WebServer/Documents/mysite/textpattern/lib/admin_config.php: r3559 (52d8b15bbf633de98c565252b9ef8ceb)
/Library/WebServer/Documents/mysite/textpattern/lib/class.thumb.php: r3301 (78f52a89b91018c8fa00ddd73cd398f5)
/Library/WebServer/Documents/mysite/textpattern/lib/classTextile.php: r3566 (03d537017f6fc1f43535fa8d18f4cd48)
/Library/WebServer/Documents/mysite/textpattern/lib/constants.php: r3488 (aa0ea1b5749497d3b19f0ed07acccaa2)
/Library/WebServer/Documents/mysite/textpattern/lib/taglib.php: r2868 (5738c5e31820cda422f32701c71cb77e)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_admin.php: r3488 (e7f66b6f8cc7e5a51eb05555ad3cb6dc)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_db.php: r3389 (0e7462a104d815a33d25c5a6e775f84d)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_forms.php: r3531 (a4dbb070460ecc5698ab80bba2cdfe5b)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_head.php: r3560 (1a82941e28253d6df3735c05df5f7ebd)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_html.php: r3569 (84ee78759355041d1ebb2c36bf565d80)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_misc.php: r3569 (ea1314b56962fc9c67885691d977a3c5)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_theme.php: r3388 (51ad413813a10071873571304bea9f97)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_update.php: r2812 (52029367bf0aef18c1879d5ff2cf3d46)
/Library/WebServer/Documents/mysite/textpattern/lib/txplib_wrapper.php: r2931 (17472ff98d9ffb3dbcc9ebdf222d11ac)
/Library/WebServer/Documents/mysite/textpattern/publish.php: r3500 (684fd1c5432ef44e843aac02e1145169)
/Library/WebServer/Documents/mysite/textpattern/publish/atom.php: r3399 (f4470b45eedc8e1ad4a48f8e74b45233)
/Library/WebServer/Documents/mysite/textpattern/publish/comment.php: r3395 (9e8596ada0a85ebdd52e1548fda81314)
/Library/WebServer/Documents/mysite/textpattern/publish/log.php: r3505 (8401dab65b91b1b1021fc876daf473bd)
/Library/WebServer/Documents/mysite/textpattern/publish/rss.php: r3399 (f8cb3ec280bffb8a15832ee3143f576c)
/Library/WebServer/Documents/mysite/textpattern/publish/search.php: r2812 (e2355f5b045bf80acc3a52ba32dddb1a)
/Library/WebServer/Documents/mysite/textpattern/publish/taghandlers.php: r3567 (e6b321fca2a729b1bb39b2facc1004f6)
/Library/WebServer/Documents/mysite/textpattern/textpattern.js: r3560 (d0f6e8f931eb32d945112b712a45e32b)
/Library/WebServer/Documents/mysite/textpattern/theme/classic/classic.php: r3191 (f5337d226aef1552c4d4d99fe3bee912)
/Library/WebServer/Documents/mysite/textpattern/update/_to_1.0.0.php: r3047 (d631745cc332531712480f2bd6dfae29)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.2.php: r3462 (a08e1b95ea2256a33effab779989d1fd)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.3.php: r3047 (888328073220c66f316c1f04e5498692)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.4.php: r3047 (3da0f3b179ad98a49f8846c4e328cd0d)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.5.php: r2894 (e5150247c0e2d8882f65e24c938df1d6)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.6.php: r3047 (faeb0eaa7c042d18e79ded54ad3f68b3)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.7.php: r3014 (59dfb80496aa6f8bbcb486f26488f65d)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.0.8.php: r3057 (89382671f0509e1d880707bbd293f86c)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.2.0.php: r3480 (7bb41aac414aff7fa81cf960b5a42c1c)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.3.0.php: r3304 (59fcf5b4e1dc7870d6729c63b824e55f)
/Library/WebServer/Documents/mysite/textpattern/update/_to_4.4.0.php: r3498 (4b3bd3eadb29f3a9df6398126e137a87)
/Library/WebServer/Documents/mysite/textpattern/update/_update.php: r3575 (3386cdffb48e0b00c2b77e00ef57daec)

————————————

Offline

#6 2011-09-03 13:01:11

testdeputy
Member
Registered: 2011-05-29
Posts: 29

Re: à showing as �

I found the culprit! It’s the pat_speeder plugin.

But I can’t figure out why…

The plugin code is:

remove spaces between html tags except pre ones
$buffer = preg_replace('/(?:(?<=\>)|(?<=\/\>))\s+(?=\<\/?)/', '', $buffer);
if (FALSE === strpos($buffer, '<pre')) { $buffer = preg_replace('/\s+/', ' ', $buffer); }
remove new lines followed by spaces
$buffer = preg_replace('/[\t\r]\s+/', ' ', $buffer);
but keep IE conditional comments
$buffer = preg_replace('/<!(--)([^\[|\|])^(<!-->.*<!--.*-->)/', '', $buffer);
and mask css comments
$buffer = preg_replace('/\/\*.*?\*\//', '', $buffer);
return $buffer;

(added bc. for better code display. -Els)

Last edited by els (2011-09-03 20:07:17)

Offline

#7 2011-09-04 11:15:37

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

Re: à showing as �

Just disable the plugin. Most websites hit the CPU limit before they hit any bandwidth limit, so this plugin doesn’t benefit most websites.

Offline

Board footer

Powered by FluxBB