Brian Dunning's FileMaker Custom Functions

Hex2Ascii ( hexString )

Convert a hexadecimal string to ASCII text using this custom function, ideal for decoding encoded strings in FileMaker.

  Be the first to rate this function Log in to vote

Dimitris Kokoutsidis   Dimitris Kokoutsidis - Show more from this author
Integrity Data
https://axelar.eu/

Share on Facebook Share on Twitter

  Sample input:
45 00 00 00 50 00 00 00 53 00 00 00 4F 00 00 00 4E 00 00 00 20 00 00 00 4C 00 00 00 33 00 00 00 36 00 00 00 35 00 00 00 20 00 00 00 53 00 00 00 65 00 00 00 72 00 00 00 69 00 00 00 65 00 00 00 73
  Sample output:
EPSON L365 Series

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

The Hex2Ascii custom function is designed to take a string of hexadecimal values and convert it into readable ASCII text. This function is particularly useful when dealing with data stored or transmitted in hexadecimal format, allowing you to decode and work with the actual text content.

The function works by iterating through the hexadecimal string two characters at a time, converting each pair of hex digits to its corresponding decimal value, and then mapping that value to the appropriate ASCII character. This process is repeated until the entire string has been decoded.

This function is highly versatile and can be used in various scenarios where hexadecimal encoding is involved, including interpreting raw data, analyzing encoded files, or working with custom scripts and integrations that require hex-to-text conversion in FileMaker.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: