Problem in rendering HTML character codes in CSV

I’m trying to export data within document fields to CSV files. The problem I’m facing here is certain fields have html character codes (for example, & # 147 ; for the special character apostrophe (')). When I export this data to CSV, I want to see the apostrophe but instead what I see is the literal text “& # 147 ;’”. There are many more characters such as this but I haven’t found a solution so far.

I do not have access to see how the data looks in the front end. The users do not use notes client but have a different interface in the web which I do not have access to. The users of the database say that they do not see these special characters in the front-end. I can only see values through document properties. And even in the document properties I see the html codes.

Any help to resolve this in Lotusscript would be highly appreciated. Thanks in advance!

Subject: Problem in rendering HTML character codes in CSV

Build a translation table that will be used to process the string you read from the document fields.

I would use a list to do this, something like this:

Dim translate List As String

translate(““”)=“'”

translate(“&”)=“&”

etc.

Then you can very easily loop throught all translations:

fieldvalue = doc.GetItemValue(“FieldName”)(0)

Forall t in translate

fieldvalue = Replace(fieldvalue,Listtag(t),t)

End Forall

That’s it.

Subject: Problem in rendering HTML character codes in CSV

Is the data stored in the document as & # 147 if so you’re getting the right behaviour. The export doesn’t know you were storing HTML strings.