Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2005-08-30 10:50:39

Sencer
Developer emeritus
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: [issue] accented character and urls

> You mean this?
> /lib/classTextile.php: r737 (91b5c252098fec80f4f4d45f1449e244)

Yepp, the file from the download has a different md5-hash, though. Can you reupload the original file from the download?

> Anyway, no, I haven’t modified anything. This is the default behavior. By the way, this
> only happens to titles, that I think aren’t processed by textile, or are they?

The way the code is in 4.0, the textiled Title is dumbed down. (This is already changed in svn). But even then – Textile will not convert utf-8 characters to numeric entities – it used to to do that in the past, but that was changed a while before 4.0 was released. That’s why I was wondering whether the problem you are having might be due to changed files or a mixture of old files.
Can you do a clean install on the same server with freshly downloaded files and see if the same problem exists?

Offline

#12 2005-08-30 12:32:08

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

Re: [issue] accented character and urls

Ok: I moved my old dir and reinstalled all textpattern folder files.

Now the class textile in diagnostic is:

/lib/classTextile.php: r737 (2b88b8520af4a64c01e1638963d9adb9)

But the problem with à converted in & #38; still remains. :-(

It remains both in creating categories (portabilità —-> portabilit38) and in article titles converted in url (portabilità —-> portabilit , cause the ampersand is stripped away by preg_replace).

Hints?

Z-

Offline

#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
Website

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
tstate

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
Website

Re: [issue] accented character and urls

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


Alex
tstate

Offline

Board footer

Powered by FluxBB