Case sensitivty

5 views
Skip to first unread message

CheeseshireCat

unread,
Mar 14, 2008, 3:03:02 AM3/14/08
to TiddlyWiki
I have a somewhat strange issue. I am using TW to make a document that
contains both Russian and English text, with most of links not being
of a humpbacked variety :) Now, Russian is one of languages notorious
for having a lot of word forms, which requires me to use the [[|]]
construction for almost every single link.

Also, the words are often either in start of sentence or in the
middle, which makes capitalization vary. Using a [[|]] construct for a
three- or four- word link half the time because of one-letter *case*
difference is not fun :(

Anyway, the actual problem, even if related, is different.

I have a tiddler named "Кварталы". I had a reference (not yet
corrected) to a non-existing tiddler named "кварталы". Here's what
happens:

If I have a tiddler named "кварталы" open and click on link to
"Кварталы" tiddler, it zooms in onto the open "кварталы" one. Same
goes the other way around.

After creating a lower-case "кварталы" tiddler, I still have the same
behaviour. I can get to the correct one ONLY if I do NOT have the
tiddler with the other capitalization already open.

When testing, I found that it behaves exactly the same way with any
other names, including English, and isn't limited to initial letter's
caps difference, nor to a case when one of tiddlers in question
doesn't exist yet. E.g., all ~200 (256 minus untestable combos like no
or just one link) possible permutaitions of existing/non-existing
tiddlers AND links named SqueAks, Squeaks, squeaks and squeAks behave
in this way.

I am using blank TW v2.3.0 as a base, and it behaves exactly the same
way in IE (v6.0.2900.2180.xpsp.050928-1517 Rus) and in Opera
(v9.23b8808), all run on WinXP Pro 2002 Rus SP2.

I searched through the group archives on "case", "Russian" and a few
other subjects, but didn't find anything even remotely resembling what
I have, with any even somewhat relevant issues being last discussed in
2005.

Ultimately, I'd prefer the way to make TW to completely ignore case of
the links/tiddlers, but barring that, a way to make TW clearly
distinguish between the cases plus twiddler aliases (or redirects, if
there's a not cumbersome way to make redirect tiddlers not show up in
lists), AND a way to make lists sort without regard to the case.

Is there any way to do that?

FND

unread,
Mar 14, 2008, 6:29:36 AM3/14/08
to Tiddl...@googlegroups.com
> When testing, I found that it behaves exactly the same way with any
> other names, including English, and isn't limited to initial letter's
> caps difference, nor to a case when one of tiddlers in question
> doesn't exist yet

I'm sorry, but I don't understand the problem (probably because I can't
relate to the Russian example).
I've created a tiddler with links to the following non-existing tiddlers:
FooBar
FoObar
FoobAr
All of those links open separate tiddlers - as they should.

> Ultimately, I'd prefer the way to make TW to completely ignore case of
> the links/tiddlers

I don't think there's a plugin for that. I'm also not sure whether
that's realistic, given that tiddlers/links are used in so many
different places.

> twiddler aliases

Try any of these:
http://tiddlywiki.abego-software.de/Beta.html#TiddlerAliasPlugin
http://www.tiddlytools.com/#AliasPlugin
http://tiddlystyles.com/#RedirectMacro

HTH.


-- F.

CheeseshireCat

unread,
Mar 14, 2008, 10:06:56 AM3/14/08
to TiddlyWiki
On Mar 14, 4:29 pm, FND <F...@gmx.net> wrote:
> > When testing, I found that it behaves exactly the same way with any
> > other names, including English, and isn't limited to initial letter's
> > caps difference, nor to a case when one of tiddlers in question
> > doesn't exist yet
>
> I'm sorry, but I don't understand the problem (probably because I can't
> relate to the Russian example).

Nope, irrelevant -- works the same way with English...

> I've created a tiddler with links to the following non-existing tiddlers:
>      FooBar
>      FoObar
>      FoobAr
> All of those links open separate tiddlers - as they should.

*hmmms* Tried with these, too. They *do* open separate tiddlers -- but
*only* as long as none of these tiddlers is open already. If any one
is, all of the links just jump to the already open one. And it is on
another machine, with different IE and Opera versions (as well as
English Win version), so it definitely is not something related to
something on my notebook...

> HTH.
>
> -- F.

FND

unread,
Mar 15, 2008, 4:28:13 PM3/15/08
to Tiddl...@googlegroups.com
> *hmmms* Tried with these, too. They *do* open separate tiddlers -- but
> *only* as long as none of these tiddlers is open already. If any one
> is, all of the links just jump to the already open one.

I'm afraid I can't confirm this - it works fine for me.
Which version of TiddlyWiki are you using?
Could you upload a simple testcase somewhere (e.g. on Tiddlyspot) and
provide us with precise step-by-step instructions on how to replicate
this issue?


-- F.

CheeseshireCat

unread,
Mar 18, 2008, 2:31:52 PM3/18/08
to TiddlyWiki
> > *hmmms* Tried with these, too. They *do* open separate tiddlers -- but
> > *only* as long as none of these tiddlers is open already. If any one
> > is, all of the links just jump to the already open one.
>
> I'm afraid I can't confirm this - it works fine for me.
> Which version of TiddlyWiki are you using?

TW 2.3.0 -- as mentioned in my initial message.

> Could you upload a simple testcase somewhere (e.g. on Tiddlyspot) and
> provide us with precise step-by-step instructions on how to replicate
> this issue?

http://xboct.tiddlyspot.com

As for replication, here's what I did as a test case, and it has 100%
replicability:

I open blank TW and in MainMenu tiddler (doesn't matter which tiddler,
actually), enter (from your example):

FooBar
FoObar
FoobAr

Then click "done".

Now, if I click on "FooBar", it opens the "FooBar" tiddler. If I then
click on "FoObar", it zooms to the already open "FooBar" tiddler
instead of opening the "FoObar" one. Same with clicking on "FoobAr".

If I then close "FooBar" and click on "FoObar", "FoObar" opens, and
clicking on others zooms to it.

Now, to demonstrate that these tiddlers are different, I edit the open
"FoObar" tiddler, then close it.

If I then click on "FooBar", an empty "FooBar" tiddler opens, and
clicking on "FoObar" zooms to it, not opens the existing "FoObar" one.
Now, I close it, click on "FoObar" to open the edited non-empty
tiddler, it opens, then when I click on "FooBar", it doesn't open an
empty tiddler, but just zooms on the open non-empty "FoObar" one.

Browsers used: IE v4, v5, v6, different builds; Opera v8 and v9
different builds. Replicability: 100%.

CheeseshireCat

unread,
Mar 18, 2008, 2:35:10 PM3/18/08
to TiddlyWiki
Um... Tried them... Actually, what I meant are aliases (stuff like a
twiddler having more than one name that opens it), not macros (i.e.,
stuff that tweaks links themselves)... Is it possible on TW?

Eric Shulman

unread,
Mar 18, 2008, 3:15:38 PM3/18/08
to TiddlyWiki
> http://xboct.tiddlyspot.com

Summary: the problem is with IE (not surprising).

Here's a technical explanation...
---------------------------------------------------

When processing a TiddlyLink, the TW core function,
story.displayTiddler(), uses
document.getElementById(id)
to determine if the tiddler is already displayed by looking for the
rendered tiddler's DOM element, whose id is composed of the tiddler
title from the link, with a prefix of "tiddler" (e.g.,
"tiddlerFooBar", "tiddlerFoObar", "tiddlerFoobAr", etc.). If the
tiddler element is not found, the TW core creates one and renders the
tiddler content into it. However, if a tiddler element with that id
*is* found, the core simply 'zooms' to it without re-rendering...
which is the correct behavior.

However... the problem is that, for IE4 through IE7, the
document.getElementById(...) function is ***case-INsensitive***, which
is contrary to the W3C spec standards, which clearly indicate that
this function is supposed to be case-sensitive.

Microsoft even notes this discrepancy in their own documentation:
http://msdn2.microsoft.com/en-us/library/ms536437(VS.85).aspx

Their note also includes a link to the IE8 (beta) references, which
indicates that in IE8, the function will finally conform to the W3C
spec, and *will* be case-sensitive (as it should have been all
along!). Note that this behavior "requires IE8 mode
compatibility" (which, thankfully, will be the default when IE8 is
finally released).

In the meantime, I have an idea for a TW 'core tweak' for
displayTiddler() that might work around this problem. Give me a
little bit to write and test it, and then (assuming it fixes the
problem) I'll publish it on TiddlyTools and post a follow-up message
(probably in an hour or two...)

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Eric Shulman

unread,
Mar 18, 2008, 5:04:51 PM3/18/08
to TiddlyWiki
> In the meantime, I have an idea for a TW 'core tweak' for
> displayTiddler() that might work around this problem. Give me a
> little bit to write and test it, and then (assuming it fixes the
> problem) I'll publish it on TiddlyTools and post a follow-up message
> (probably in an hour or two...)

A workaround core tweak for IE's case-insensitive handling of
displayed tiddlers is now available here:
http://www.TiddlyTools.com/#CoreTweaks

enjoy,

FND

unread,
Mar 18, 2008, 5:26:37 PM3/18/08
to Tiddl...@googlegroups.com
Thanks for the detailed analysis, Eric.
It had never occurred to me that IE's getElementByID() might be
case-insensitive - although I'm not particularly surprised either, of
course...

> A workaround core tweak for IE's case-insensitive handling of
> displayed tiddlers is now available

Could you raise a ticket and submit a patch for that?
I'm not sure to which extent the TiddlyWiki core should actually account
for such browser bugs, but we should have a record in Trac either way.


-- F.

CheeseshireCat

unread,
Mar 19, 2008, 9:57:29 AM3/19/08
to TiddlyWiki
Does the same workaround work for Opera, too? (It behaves exactly same
way in Opera as well)

Eric Shulman

unread,
Mar 19, 2008, 10:33:25 AM3/19/08
to TiddlyWiki
> > > A workaround core tweak for IE's case-insensitive handling of
> > > displayed tiddlers is now available

> Does the same workaround work for Opera, too? (It behaves exactly same
> way in Opera as well)

I've got Opera 9.26 build 8835 installed, and it seems to work just
fine, without the tweak... what version are you using?

-e

CheeseshireCat

unread,
Mar 19, 2008, 10:49:12 AM3/19/08
to TiddlyWiki
v9.23b8808, v9.24b8816 and v8.51.
Reply all
Reply to author
Forward
0 new messages