July 17, 201015 yr I'm using FileMaker 11 Advanced, and I'm exporting data as an XML file. This exports fine, but on certain records I have foreign characters that are exported and tripping up the ultimate XML import into another application. I'm trying to find a way to "clean up" the text in FileMaker so that these foreign characters don't corrupt the XML file. Some of these problematic characters appear in FileMaker to be: Ê ¥ ...and so on. Is there a way to strip out foreign characters in FileMaker before generating the XML file? Or perhaps an program/online site that will allow one to convert an XML file with these types of problematic characters to strip them out? I'd like a solution from the filemaker side of things, but at this point I'd take any help I can get. Please help, thanks.
July 17, 201015 yr Can you update your profile, it indicates you're using FMP 6. Is the problem with the "other" program not accepting the foreign characters? If it is I'd be talking to its developers and getting them to update to the 20th Century standards. It should be able to handle Unicode. You could create an XSLT style sheet to replace the foreign characters with others, but you'll have to map them all and work out what the translation needs to be. For instance, what should ¥ be replaced with? (It may well be that something already exists to do this so search around.) As a quick fix you could open the program in a text editor (something like Word would probably not be a good choice because it'll want to add formatting to the file) and find/replace all the foreign characters manually. Here in Australia we deal with foreign characters with offshore processing. (local politics joke)
July 17, 201015 yr Author Vaughan, thanks for your reply. I just updated my profile by the way. The problem is that I don't know the exact characters to replace. There are numerous foreign characters that are causing an XML import crash, some I don't even know are causing problems. So I can't do a proper find/replace. When I run the XML file through a parser, like Opera web browser, I don't get any errors. So it's likely as you mentioned a unicode issue with the other app importing the XML file. I was just hoping in FileMaker I could force an XML export to Latin Encoding. However, in the XML export options for FileMaker, I see the "Output Character Set" as always dimmed and not selectable. I could check with the other app and try to contact them to take unicode, but I was just hoping for some sort of "Latin to Unicode XML Converter" or something from within FileMaker to do the trick. I'm a bit of a newbie when it comes to XML, so I hope I'm making sense with my dilemma. Thanks. I
July 17, 201015 yr You can change the encoding by using a XSLT stylesheet during the export. But there's still the question if the other app will accept those characters in Latin (i.e ISO-8859-1) encoding.
July 17, 201015 yr Author Since I'm an XML newbie, do you mind just telling me the steps involved in using an XSLT stylesheet to make the text setup for Latin encoding? I'm a bit confused here. Thanks.
July 17, 201015 yr Author Ahhh I have this setup as an automated script, so when I manually go to File > Export > XML FMPXMLRESULT I see the checkbox for "Use XSL Style Sheet". However, what type of file or HTTP Request should I use to make the encoding forced to Latin? Thanks.
July 17, 201015 yr Try the attached. It doesn't do anything except change the encoding. I must say I am surprised the other app can import FMPXMLRESULT. latin.zip
Create an account or sign in to comment