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/buildGeneReviews.sh src/hg/utils/otto/geneReviews/buildGeneReviews.sh
index 01df03328c1..c3bf3db7510 100755
--- src/hg/utils/otto/geneReviews/buildGeneReviews.sh
+++ src/hg/utils/otto/geneReviews/buildGeneReviews.sh
@@ -1,19 +1,26 @@
 #!/bin/sh
 set -e
 # processing raw data file from GENEREVIEWS
 
+# The NCBI files are Latin-1, not UTF-8.  Under a UTF-8 locale grep treats them
+# as binary and silently drops the lines that hold the high bytes, so two
+# disease titles go missing.  cron runs with no locale set and is safe, but a
+# hand-run from a login shell is not.  Pin the locale so both behave the same.
+LC_ALL=C
+export LC_ALL
+
 geneDiseaseFile="geneReviewsGeneDiseases.tab"
 
 function createGeneReviewTables() { 
 #Create geneReviews table and bigBed
 
 # Load the internal working table geneReviewsGrshortNBKid to hg38/hg19/hg18
 hgsql $1 -e 'drop table if exists geneReviewsGrshortNBKidNew'
 hgsql $1 -e 'create table geneReviewsGrshortNBKidNew select * from geneReviewsGrshortNBKid limit 0'
 hgsql $1 -e \
 'load data local infile "geneReviewsGrshortNBKid.tab" into table geneReviewsGrshortNBKidNew'
 
 # Load the internal working table geneReviewsGrshortTitleNBKid to
 # hg38/19/18
 hgsql $1 -e 'drop table if exists geneReviewsGrshortTitleNBKidNew'
 hgsql $1 -e 'create table geneReviewsGrshortTitleNBKidNew select * from geneReviewsGrshortTitleNBKid limit 0'