Skip to main content
Hi all.

 

 

I have an oracle-database from which I read spatial data. Thes objects have attributes with textstrings up to 4000 charachters. The strings are formatted as RTF, se sample below

 

 

{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Helvetica;}}

 

\\viewkind4\\uc1\\pard\\b\\f0\\fs17 . * (T) Oslofjorden. Oslo. Sjurs\\'f8ya. Lysb\\'f8yer. Nye posisjoner (\\i Light buoys. New positions).\\i0 

 

\\par }

 

 

 Is there any way to convert these RTF-fields to plain text in FME? So far I havent been able to find any specific transformer that allows me to do this.

 

 

Does anyone here have any suggestions maybe?

 

 

Thanks in advance

 

.

 

-Tobias P.
Hi,

 

 

you will most probably have to use a script inside a PythonCaller to convert the RTF blocks into plain text.

 

 

Here is a discussion (http://stackoverflow.com/questions/1337446/is-there-a-python-module-for-converting-rtf-to-plain-text) about various modules that support this conversion (you'll have to download and install them into the FME Python interpreter first).

 

 

David
Thanks! I also googled a bit and saw that the solution probably would be a python script. I got some help from safe support and conversion runs excellent.
Hei,

 

 

godt å høre at det løste seg, lykke til med sjødataene :-)

 

 

David

Reply