Subject Re: [firebird-support] Again: richtext to plaintext UDF
Author Stefan Gustavsson
Hi Ursa!

I have a udf that does what you are asking for it's a quick hack and
it's far from perfect
but it works. I will try to find the source code for it and put it
online for you.

If you don't wan't to wait for me to find the source you can have a
look at this link

Here are some pseudo code for a simple parser



IF Find the first \
Find the following space
Remove everything in between
Return True
return false


Best regards, Stefan

On Sun, 30 Jan 2005 16:13:34 +0100, Urs Liska <firebird@...> wrote:
> Alan McDonald schrieb:
> >>Hello again,
> >>
> >>as nobody replied to my last post, I try it again and keep it more
> >>straightforward ;-)
> >>
> >>Does anybody know of a practicable method of extracting plain text from
> >>a blob field containing rich text?
> >>
> >>I would be happy about:
> >>- an existing UDF (or UDF library) already implementing this
> >>- an algorithm, a function or a component that I can use to write my own
> >>UDF in Delphi
> >>- any other idea how to solve the task.
> >>
> >>Thanks
> >>Urs
> >
> >
> > maybe you could write a UDF with the TRichView component which has
> > SavetoStream, LoadfromStream functions.
> > Alan
> >
> That was already proposed to me in a Delphi forum.
> But as described in my earlier post the line "RichEdit1.Plaintext :=
> true" (apparently it was this line) caused the Firebird server to crash.
> Urs
> Yahoo! Groups Links