Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-09-02 16:20:38

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [issue] accented character and urls

Anyone can help me with my problem? Maybe this excerpt from diagnostic my help someone to figure out why some extra basic ascii chars are translated in & #38; in article titles and category names. Here it is the part about charset:

Charset (default/config): latin1/latin1
character_set: latin1
character_sets: latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5
18 Tables: OK

Estensioni PHP: xmlrpc/0.51, xml, wddx, tokenizer/0.1, swf, standard/4.4.0, sockets, session, pspell, posix, pcre, overload, mysql, ming, mhash, mcrypt, imap, iconv, gettext, gd, ftp, domxml/20020815, curl, ctype, calendar, bcmath, zlib/1.1, openssl, apache, Zend Optimizer

z-

Offline

#14 2005-09-04 23:54:58

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [issue] accented character and urls

This works perfectly for everyone else. All I can suggest, since you seem to know some PHP, is to place some debug print/var_dump statements in the dumbDown() function, and see what’s happening. Most likely it simply isn’t loading the i18n file at all.


Alex

Offline

#15 2005-09-06 10:56:15

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [issue] accented character and urls

Thank for your answer, I’ve done some debug. The i18n file si loaded, ‘cause other accented chars are correctly translated. The problem only happens with some chars (in italian I found this behavior on à, and other chars from eastern languages that I don’t mind).

And the problem only happens when the i18n file is processed by TXP!! Because if I copy the dumbdown function in another file and do some strings transformation, everything is ok, even with à!

More, the problem happens on two different servers from a default installation (before I did some modification for the debug). This is the reason I thought that none found the bug only because they don’t need that special chars, but if you say that this happens only to me, I don’t know what to think.

I thought that the encoding issues of the server may be the problem when the titles are processed by textpattern, but it’s only a speculation.

Surely is one of the strangest bugs I’ve seen.

Maybe the solution is really simple, afterwards… :)

Thanks.

Z-

Offline

#16 2005-09-06 19:54:31

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [issue] accented character and urls

Wow! I just upgraded to 4.0.1, and seems that the problem has been fixed! Both in categories name and in article titles!

Thank you very much, you made me happy! :)

Z-

Offline

#17 2005-11-24 21:17:14

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [issue] accented character and urls

Following up, if anybody still has problems, check Ampersands, PHP Sessions and Valid HTML

W3C’s team offers 3 options to solve this problem :

<blockquote>

Editing php.ini

The php.ini file contains the central configuration data for an install of PHP on a computer. You can specify a character reference to use there. <code>arg_separator.output = “&amp;”</code>

Apache directives

The Apache web server can set PHP scripts in all the usual places. This allows different directives to be set on a per site or per directory basis (in, for example, a <location> block or .htaccess file). <code>php_value arg_separator.output &amp;</code>

Per script basis

PHP configuration directives can be set on a per script basis with the ini_set function. Put the code to set the directives at the top of your script. <code><?php ini_set(‘arg_separator.output’,’&amp;’); ?></code>

</blockquote>

Hope it helps :D

Last edited by davidm (2005-11-24 21:19:08)


.: Retired :.

Offline

#18 2005-11-24 21:43:18

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [issue] accented character and urls

I’m confused – what does the Ampersand thing have to do with this thread?


Alex

Offline

Board footer

Powered by FluxBB