Without rules defining what characters to swap out, Perl can't distinguish between characters that should be modified and those that shouldn't. This is a pretty difficult problem, since accent rules alone require splitting words into syllables and knowing the rules for both regular and irregular accentuaton. There are a few solutions here. First, you may indeed want to code all these in, even as rough as that would be. That would entail finding comprehensive rule sets for your language(s) and recording all common exceptions. The opposite way is to decrease the resolution of your search space rather than artificially increase the resolution of your search term (see lhoward's code above). In other words, modify your search indexer so that non-keyboard letters are transliterated into the corresponding keyboard letters. The problem with this, of course, is that you'll get a few false matches. A last approach would be one like killedar was pursuing here, which has the user learn a few non-naturally occuring character combinations which stand in for modified letters. Obviously, users don't like learning how to type again for your site. Then again, there may be a standard way of doing this which I haven't heard of; look around at how other language sites handle the same problem.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|