find: Newline Handling

1 
1 4.3 Newline Handling
1 ====================
1 
1 Within the database, file names are terminated with a null character.
1 This is the case for both the old and the new format.
1 
1    When the new database format is being used, the compression technique
1 used to generate the database though relies on the ability to sort the
1 list of files before they are presented to 'frcode'.
1 
1    If the system's sort command allows its input list of files to be
1 separated with null characters via the '-z' option, this option is used
1 and therefore 'updatedb' and 'locate' will both correctly handle file
1 names containing newlines.  If the 'sort' command lacks support for
1 this, the list of files is delimited with the newline character, meaning
1 that parts of file names containing newlines will be incorrectly sorted.
1 This can result in both incorrect matches and incorrect failures to
1 match.
1 
1    On the other hand, if you are using the old database format, file
1 names with embedded newlines are not correctly handled.  There is no
1 technical limitation which enforces this, it's just that the 'bigram'
1 program has not been updated to support lists of file names separated by
1 nulls.
1 
1    So, if you are using the new database format (this is the default)
1 and your system uses GNU 'sort', newlines will be correctly handled at
1 all times.  Otherwise, newlines may not be correctly handled.
1