• The way the barcode functions work is always the same: you pass a string with the source code ('bananas') and you get the coded barcode string ( ÑbananasÈÓ, always starts with capital Ñ and ends with Ó).

    I expect one or more of the functions/tools people have suggested will do the business.

    But I wanted to point out that Code 128 is not quite like that. Unlike eg Code 39, it is not a straight character-for-character substitution, so just applying a font with static bracketing values doesn't work. It needs a calculated checksum (which is not shown in the human-readable version nor transmitted to the receiving system, but ensures the quality of the data read by the scanner), which is why you need to apply a function to the data you want to encode. And I do not think the control characters are universal - I have seen different font sets that have made different choices with regard to the extended characters they use to represent the control values. Presumably the ones you specify will work for your environment.