Bibliophile

Posted on May 11, 2007

Browsing works in Lingo. You can check out the Russian/English dictionary or the Japanese/English dictionary to see. It was easier than I expected, though not without errors (typos are the bane of coding). Also, it’s still not quite perfect.

In the text file, I used \n liberally so synonyms would each show up on a new line. These were passed directly into MySQL as is. However, PHP is ignoring it. In many computer languages, \n creates a new line. PHP is the same way, but for some reason \n is getting lost or not being interpreted. Looking in PHPMyAdmin, I can see them presented as they are supposed to be (on a new line), so I assume \n is still in there, but maybe MySQL isn’t passing it along. Dunno.

updated
It turns out HTML was ignoring \n, not PHP. PHP passes it along as a new line, but HTML has a special tag for that < br > without the spaces in between. I fixed it with a handy inline str_replace statement. Now the dictionaries render more or less properly (I won’t get into the whole alphabetical order thing now).

Related posts:

  1. Usage of the word “fuck”
  2. Senile computing
  3. Search
  4. Lingo Ringo
  5. StarDict

Filed Under: Code, Journal, LAMP, Open Source, TESOL | Comments Off

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

Spam protection by WP Captcha-Free

Comments are closed.

© Copyright gottahavacuppamocha • Powered by WordpressCoffee Candy is based on the Eye Candy theme.