Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2004-02-25 10:28:14

Dean
Founder (Gone, but not forgotten)
From: Languedoc
Registered: 2004-02-14
Posts: 235
Website

Re: Textile Internalization

Yes, but htmlentities() is there for the (not exactly edge) cases where those writing vanilla Western-European text will benefit from having high-ascii characters converted to entities when there’s no mbstring functions to rely on. As I say, it’s a flawed solution.

I do, as part of a larger Textile internationalisation effort, need to implement a ‘clean utf-8’ option for Textile. I will. Honest.


text*

Offline

#26 2004-02-25 10:40:06

pospel
Member
From: Ukraine
Registered: 2004-02-23
Posts: 40
Website

Re: Textile Internalization

We hope so and will help you as much as we can :)

Besides, there are lib iconv() for correct converting characters to varios encodings, but it is a module, whicj need to be compiled with php and not commonly available on php hostings. Though, you can include it in sourcecode and distribute with Textpattern.

Offline

#27 2004-06-29 19:31:47

Denbo
Member
From: Russia
Registered: 2004-06-27
Posts: 12
Website

Re: Textile Internalization

mmm. I have a problem: when I commented

$text = $this->encodeEntities($text)

nothing changed and my russian text look ok on browser but not correct in source code :-(

example: http://minimal.ru/txp/

Can you help me?

Last edited by Denbo (2004-06-29 19:32:40)

Offline

#28 2004-06-29 19:43:50

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: Textile Internalization

“not correct in source code” – what does that mean?

Offline

#29 2004-06-29 19:47:52

Hans
Member
From: Everywhere
Registered: 2004-03-07
Posts: 99
Website

Re: Textile Internalization

I’d say it looks pretty Russian to me, on the site and in the source code… at minimal.ru/txp/, of course.


Lumilux – A Photoblog

Offline

#30 2004-06-29 20:27:11

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: Textile Internalization

The site surely displays fine in Russian. Possible interpretation of your problem:

  1. your article titles in permanent links are garbled: there is no workaround for this, you will either have to disable title attaching (see the admin_config.php file), or use the ‘URL-only title’ feature on your TXP ‘write’ tab
  2. you use Internet Explorer which uses Notepad to display the source code and it’s not configured to display Unicode text properly (quite likely on Win98): use some another editor which fully supports Unicode and also check that you have selected a reasonable font in your editor (this is something that doesn’t really have anything to do with TXP)

Last edited by mamash (2004-06-29 20:27:46)


Who’s gonna textdrive you home tonight?

Offline

#31 2004-06-29 20:46:45

Denbo
Member
From: Russia
Registered: 2004-06-27
Posts: 12
Website

Re: Textile Internalization

> mamash wrote:

> # you use Internet Explorer which uses Notepad to display the source code and it’s not configured to display Unicode text properly (quite likely on Win98): use some another editor which fully supports Unicode and also check that you have selected a reasonable font in your editor (this is something that doesn’t really have anything to do with TXP)

yes I use it (in WinXP), but at http://blog.emo.com.ua/ the source look ok in notepad
And I worry this is not notepad problem and site don’t indexing by searchengens…

Last edited by Denbo (2004-06-29 21:04:07)

Offline

#32 2004-06-29 22:22:24

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: Textile Internalization

The source code of both of these pages is exactly the same when it comes to Russian characters. OK, I don’t know what’s causing your problem, but I assure you that the same kind of code is served to anybody who visits your pages. It’s raw UTF-8 coded characters, served with a proper UTF-8 charset declaration, which is perfectly legal and correct. There should be no problem with search engines, either.

(I can’t replicate the situation with me, because I’m using a different editor for IE and for some reason it won’t allow me to switch back to Notepad. It works, however, in any browser I was able to run here.)


Who’s gonna textdrive you home tonight?

Offline

#33 2004-06-30 06:23:35

Denbo
Member
From: Russia
Registered: 2004-06-27
Posts: 12
Website

Re: Textile Internalization

oooh! thank you!
yes, I vainly worried about posting text :-)

When I look at source on Firefox and Dreamweaver it’s OK :-)
just earlier I did not face such problem and worried that something wrong.

But I try go to the permaink with only russian chars (wrong display too) and it don’t work :-(

Last edited by Denbo (2004-06-30 07:08:06)

Offline

#34 2004-06-30 08:43:40

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: Textile Internalization

Denbo wrote: But I try go to the permaink with only russian chars (wrong display too) and it don’t work :-(

I think it comes from the fact that TXP tries to lowercase the URL titles, which fails on your server. There have been some issues with lowercasing non-English characters on many servers. TXP has to rely on how PHP does the job done here.

If you didn’t turn off the character encoding in your classTextile.php file, the character would be converted to Unicode numeric entities anyway. But even if you saw the attached titles in links properly, after clicking on them the browser would simply encode them to numeric entities to display them in the address bar.

As of now, there’s really no way how to have non-ASCII URLs work properly and consistently. It’s how Internet was designed. It may change though – I know there are attempts to find a global workaround.

For now, you solution is to either disable attaching the titles to you permalinks, or for each article enter a short transliterated title into the ‘URL-only title’ field under ‘Advanced Options’ on your ‘Write’ tab.

Last edited by mamash (2004-06-30 08:43:50)


Who’s gonna textdrive you home tonight?

Offline

#35 2004-06-30 09:41:47

Denbo
Member
From: Russia
Registered: 2004-06-27
Posts: 12
Website

Re: Textile Internalization

> mamash wrote:
For now, you solution is to either disable attaching the titles to you permalinks, or for each article enter a short transliterated title into the ‘URL-only title’ field under ‘Advanced Options’ on your ‘Write’ tab.

Yes, I agree. I try transliterated title into the ‘URL-only title’ and it’s OK.

Thank you!

Last edited by Denbo (2004-06-30 09:42:28)

Offline

#36 2004-08-26 22:49:49

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Textile Internalization

From the french point of view, encoding special char into numeric html entitie is good, maybe better then using pure UTF.

But I agree on the typo rules, it would be very nice to add some typo localized rules, maybe an extern config file or table we can fill for you.

Customizing the edit area may be a good thing too… several languages make intensive use of characters hard to create on a keyboard, it would be nice to have some way to generate it: either by a javascript button/insert, or by a specific (but simple) code.

Offline

Board footer

Powered by FluxBB