[SOLVED] filedump /nobom
Author: gianni.sandigliano@unifacesolutions.com (gianni)
We are still moving an application from U9.2 to U9.6.07-X704. This application use filedump to generate a text file to be sent to banks in its simplest syntax: filedump myVariable, myFilename This instruction is now by default adding at the beginning of first line of the file some unreadable characters related to Unicode BOM (byte order mark) and it was introduced in 9.6.04. What about compatibility with the past? I've looked into assignment files switches, always used in the past in similar situations to maintain compatibility but with no luck. Should we change all references to filedump instructions generating a text file adding a /nobom qualifier if destination of the text file does not appreciate this behaviour changing? Gianni
6 Comments
Local Administrator
Hi Gianni, there is an ASN for it:
$NO_BOM_UTF8
Determines whether Uniface writes a Unicode Byte-Order-Mark (BOM) when the UTF-8 format is specified in $SYS_CHARSET or with filedump or lfiledump.
$NO_BOM_UTF8 { = } true | false
Arguments
true—write a UTF-8 file without a BOM
false—write a UTF-8 file with a BOM
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
The old behavior in Uniface 9.2 was actually a BUG:
In case you want the "old" behavior back then you have the options to either use the ASN setting $NO_BOM_UTF8=true or the Pro instruction filedump/nobom. Hope this helps. Regards, Daniel
Author: diseli (daniel.iseli@uniface.com)
Local Administrator
Great! I've searched into CHM file for: - nobom - NOBOM - no_bom - NO_BOM with no clue... Thanks guys, you've just saved my day! :-) Gianni
Author: gianni (gianni.sandigliano@unifacesolutions.com)
Local Administrator
Hi Gianni, I'll add a link to from the filedump to the $NO_BOM_UTF8 setting so it's easier to find from the relevant Proc. Search Tip: If you are expecting to find something in the CHM file, it can also help to truncate a term (NO_BOM* etc.), or generalize the search a bit (BOM instead of NO_BOM etc.) Also, feel free to use the Feedback link at the bottom of every page to suggest improvements to the documentation. Hope this helps, Barbara Douma Information Developer, Uniface
Author: Barbara Douma (barbara.douma@uniface.com)
Local Administrator
Barbara, thanks for your input...and for creating such link into filedump documentation. I've always used CHM help file intuitively without looking for any document describing its usage. It's still a little obscure to me having a subject named $NO_BOM_UTF8 why it should be found "BOM" or "NO_BOM*" while it shouldn't "NO_BOM"...probably I should dedicate a couple of minutes to study search functionality available within standard Windows CHM viewer. Thanks all for your help! Gianni
Author: gianni (gianni.sandigliano@unifacesolutions.com)
Local Administrator
The search functionality in CHM files ignores symbols such as $ and # and \. However, it doesn't ignore underscores, so when you look for NO_BOM, it won't find it. You need to use a wildcard like the asterisk (*), hence NO_BOM* works. My real point about searching more generically is that any topic that is going to be discussing the BOM is likely to include that word somewhere in the text. So instead of trying to think about what kind of name developers might invent for a switch, just search for a word that is likely to occur somewhere in that page. Some other search tips:
Regards --- B.
Author: Barbara Douma (barbara.douma@uniface.com)