View Single Post
Old 12-09-2012, 11:26 AM   #153
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Ah, ok. No, the code is supposed to do what you asked for.

1) If the keyword is only 1 character long, the code appends an "a" to it.
2) Then it looks at the first two characters of the keyword. If both are (an ASCII letter or have ord() > 127), then the keyword goes to a suitable ??.html file. Otherwise, it goes to 11.html.

There might be still a small "slack", for example in the mentioned case of "o'clock". But I tested that putting "o'clock" into 11.html works, so I guess the current code is fine.
AlPe is offline   Reply With Quote