UTF-8 and TOHTML wierdness
Walter Vaughan
wvaughan at steelerubber.com
Thu Jun 15 17:11:28 PDT 2006
Kenneth Brody wrote:
> 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.
>>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 am having a "Mad Cow" moment, what would be the proper XLATE command
>>to convert a " into something that would become a "e; (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")).
dc=XLATE(33,chr("148"),chr("34"))
dc=XLATE(dc,chr("147"),chr("34"))
ds=""{tohtml(dc){"";
Some of this data originally was in an InDesign document, thus the wild open and
close quotes.
Thanks a ton for seeing this.
__
Walter
More information about the Filepro-list
mailing list