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

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

Recommended Posts

Posted

I would like to export a text field, but the characters in the exported file occupy 2 bytes.

I would only need the 1-byte character codes. How can I create such an export?

I show the problem in this picture.

TXT-sample.jpg

Posted

Are you using the Export Field Contents instruction? If so, the resulting file uses UTF-16 encoding.

There are several methods to produce a UTF-8 encoded file; which one would be most suitable for you depends on what exactly you are doing. For example, you could isolate the record and export it as tab-separated, with only one field in the field export order. But that wouldn't work well if the field contains tabs or carriage returns. 

 

Posted
7 minutes ago, comment said:

Are you using the Export Field Contents instruction? If so, the resulting file uses UTF-16 encoding.

There are several methods to produce a UTF-8 encoded file; which one would be most suitable for you depends on what exactly you are doing. For example, you could isolate the record and export it as tab-separated, with only one field in the field export order. But that wouldn't work well if the field contains tabs or carriage returns. 

 

Yes, I want to export a calculated character chain in a text field, but i need this exactly. The character chain does not contain control or special codes, just letter, numbers and "space" characters.

Posted

Well, you already have one possible method. Briefly, other options are:

  • Use the TextEncode() function to create the file in a global container field; then export the container field's contents (requires v. 16 or higher);
  • Same thing as above, only using the Base64Encode and Base64Decode functions (this works in v.13 and up);
  • Write directly to a data file (requires v.18+);
  • Export the record as XML using a custom XSLT stylesheet; this allows you to choose the target file's encoding and preserve all special characters (works in all versions since v.6)

 

 

  • Like 1
Posted
36 minutes ago, comment said:

.....  Write directly to a data file (requires v.18+);

 

 

Thanks for the help, writing directly to the file and utf-8 setting solved my problem.

This topic is 447 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.