Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6676 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey

I have a solution that interacts with other programs using an XML export. Currently, I have FMP create my file in a global and then using the "Export Field Contents" the user saves the file.

My problem is Filemaker saves the file in Unicode, but my clients antiquated other system only accepts ANSI characters.

How do I tell Filemaker to save the file as ANSI?

The work around, is to have the client check off the 'automatically open file' checkbox, the file opens in WordPad, then they use 'save as' to save as ANSI instead of Unicode.

Anyone know a more eligant solution?

TIA

Jerry

Posted

Is the data you're exporting supposed to be XML? If so, you could export it as XML, using an XSL stylesheet. There is an encoding attribute of the output element where you can specify what you want the result to be. Looks kind of like this (partial xsl; don't know exactly what ANSI would be, but "iso-8859-1" is pretty common):(


<?xml version="1.0" encoding="utf-8"?>



    

Posted

The format is 'like' xml but not really. My first pass at this problem was to do what you suggested, but I quickly found I was in over my head wrt xslt to convert it in to the format I really need.

The easiest way to accheive my goal was to do it in FMP, then export it. That is my comfort zone.

The last problem is just converting it from Unicode back to old fashon ANSI.

Jerry

Posted

Yes, it's hard to get started with xsl. But the thing is, if your export is fairly generic, say tab-separated or comma-separated, with or without a header line, or a single field, then you only need a fairly generic xsl. I've posted several, over time, that will transform exports; it doesn't matter what fields.

But I'd need to know more about what you want, in order to decide which you need. I cannot tell what it is from "I put it all in a global field" :-]

It would also help to know what platform and Filemaker version your client is using. If it's Mac OS X there is likely a way to do it with AppleScript or command line (I'm not sure about Jaguar however, I haven't used it for quite a while). But xsl is preferred, as it's cross-platform and reliable.

I know this Unicode (especially UTF-16) and plain text problem is annoying. But there are good reasons why it's needed. Whoever said that what you can't see can't hurt you :-?

Feel free to send me a private message, if you post more, to remind me so I don't miss it.

This topic is 6676 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.