Chris Sainty

A technical blog covering full-stack web development.

twitter | github | stackoverflow

Posts about - vfp

Creating an FLL

I have been playing around in the last week or so with creating an FLL. I came across a set of C++ classes called CLucene that do indexing and searching of text. This is something I have long had an interest in and often mess around with in VFP.

Read More

UTF-8 Encoding

I was recently working on creating RSS feeds dynamically from a product database, and kept finding they would not validate due to invalid characters being used for UTF-8 encoding.

I found a quick one liner that seems to tidy this up, albeit in a way i'm somewhat less than comfortable with (I never did exhaustive tests to be sure it didnt mess with the valid data in some way). Anyway here is my code

cStr= strconv(strconv(m.cStr,11),9)

Has anyone done a similar thing before and have a better solution? Or better yet put my mind at ease that I have no reason to dislike this one.

STREXTRACT()

To stem the code overload of the last two posts I am going to mention one of my favourite VFP functions.

Read More

Phonetics with Double Metaphone and VFP

Something that has been floating around in my "to-do" list for quite some time is to write a class for phonetic keyword matching in a fox database. The idea is for it to be a step down from PhDbase (link) without losing the functionality I personally find most useful, phonetic matching.

Read More

Scripted Text Generation

The first piece of code I would like to post is one of my favourites, in that geeky kind of way. A quick little routine to take a file that mixes static text with foxpro expressions and scripting then turns it into a foxpro procedure.

We use this code to process HTML and XML template files used by our websites into efficient compiled foxpro code. I made mention of this code as part of my presentation at OzFox Lite in March 2006. So here it is!

Read More