UTF-8 and TOHTML wierdness

Kenneth Brody kenbrody at bestweb.net
Thu Jun 15 15:18:19 PDT 2006


Quoting Walter Vaughan (Thu, 15 Jun 2006 16:23:47 -0400):

> Okay, maybe it's doing what it's supposed to do, but when I use the
> TOHTML command for a current need it's creating a \x94 code which I
> belive is coming from a double quote (inch marks) in a field.
>
> The incoming application gets a XML document and seems to very much not
> like that code.
>
> I thought the problem was with the application, but if I run xmllint on
> the file I get the same error "Input is not proper UTF-8".
>
> I could delete the inch marks, but they *are* important and significant.
>
> I am having a "Mad Cow" moment, what would be the proper XLATE command
> to convert a " into something that would become a &quote; (sp?) instead
> of \x94?

Well, just remember that ” and " are not the same thing.  The
TOHTML()
function will convert the quote -- ascii 34 (hex 22) -- to """.
However, it will not convert your ” -- ascii 148 (hex 94) -- into
""", as it is not the quote character.

Now, you can have filePro convert that character into a quote, by
using XLATE(field,chr("148"),chr("34")).  Or, you can figure out how
you want to handle this character, without pretending it's a quote.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list