74f5343d5f22428477778d20a5dc6e9e39c213fd
braney
  Thu Aug 13 14:36:56 2026 -0700
geneReviews otto: pin the locale so a hand-run matches the cron run, refs #38098

The NCBI GeneReviews files are Latin-1. GRtitle_shortname_NBKid.txt holds two
titles with high bytes, "Cantu syndrome" and "Stromme Syndrome". Under a UTF-8
locale GNU grep decides the file is binary, drops those two lines and writes a
note to stderr that the wrapper's mail never shows. cron runs with no locale set
and is safe, but a hand-run from a login shell quietly loses two disease titles
and three geneReviewsDetail rows.

Set LC_ALL=C in all three scripts. This also keeps sort and join in agreement in
validateGeneReviews.sh whichever way the job is started.

diff --git src/hg/utils/otto/geneReviews/validateGeneReviews.sh src/hg/utils/otto/geneReviews/validateGeneReviews.sh
index 5b060479dcd..71672089b7d 100755
--- src/hg/utils/otto/geneReviews/validateGeneReviews.sh
+++ src/hg/utils/otto/geneReviews/validateGeneReviews.sh
@@ -1,17 +1,21 @@
 #!/bin/sh -e
 
+# Pin the locale so sort and join agree, whether run by cron or by hand.
+LC_ALL=C
+export LC_ALL
+
 db=$1
 tooMuch=0.1000   # how much change (either gain or loss) is too much
 
 tab=`printf '\t'`
 
 # Write one line per gene per chromosome: "gene|chrom", lowest start, highest end.
 function geneSpans() {
 hgsql -N $db -e \
     "select name, chrom, min(chromStart), max(chromEnd) from $1 group by name, chrom" \
     | awk -F'\t' '{OFS="\t"; print $1"|"$2, $3, $4}' | sort -t "$tab" -k1,1
 }
 
 for i in `cat ../geneReviews.tables`
 do
     f=$i"New"