From 1dc26cd2b496958f9106797bca31500849b4656a Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Mon, 24 Aug 2026 21:17:57 +0200 Subject: [PATCH] Bump the vendored engine to eeba324c Engine #1376 added htsescape.c, and htstools.c calls into it. Android builds htstools.c, so the file joins Android.mk's hand-maintained source list; without it ld.lld leaves hts_unescapehttp and hts_unescapeini undefined. #1407 converted all 30 catalogs to UTF-8 and retired LANGUAGE_CHARSET, so build_strings.sh loses its charset assertion, the charset read below it, and the iconv stage they fed. The iconv goes rather than being retargeted at utf-8: macOS ships a Citrus iconv that rejects valid UTF-8. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Xavier Roche --- app/src/main/jni/Android.mk | 1 + app/src/main/jni/httrack | 2 +- tools/build_strings.sh | 10 ++-------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/jni/Android.mk b/app/src/main/jni/Android.mk index 30796d7c..5f3f23cf 100755 --- a/app/src/main/jni/Android.mk +++ b/app/src/main/jni/Android.mk @@ -76,6 +76,7 @@ LOCAL_SRC_FILES := httrack/src/htscore.c httrack/src/htsparse.c \ httrack/src/htscache_selftest.c httrack/src/htsdns_selftest.c \ httrack/src/htscodec.c httrack/src/htsproxy.c \ httrack/src/htsurlport.c httrack/src/htswarc.c \ + httrack/src/htsescape.c \ httrack/src/htsnet.c httrack/src/htsrandom.c \ httrack/src/htssitemap.c httrack/src/htssinglefile.c \ httrack/src/htschanges.c httrack/src/htscmdline.c \ diff --git a/app/src/main/jni/httrack b/app/src/main/jni/httrack index 1f2c4cf8..eeba324c 160000 --- a/app/src/main/jni/httrack +++ b/app/src/main/jni/httrack @@ -1 +1 @@ -Subproject commit 1f2c4cf81fc82ffd3495ffb97073072fb5733d71 +Subproject commit eeba324c9b5d0536b8f4c2ce2f657658c610e970 diff --git a/tools/build_strings.sh b/tools/build_strings.sh index 4cb846f2..da7ca5fa 100755 --- a/tools/build_strings.sh +++ b/tools/build_strings.sh @@ -22,12 +22,7 @@ if test $(head -5 $i | tail -1 | tr -d '\r') != "LANGUAGE_ISO"; then echo "bad file $i: LANGUAGE_ISO expected" exit 1 fi -if test $(head -9 $i | tail -1 | tr -d '\r') != "LANGUAGE_CHARSET"; then -echo "bad file $i: LANGUAGE_CHARSET expected" -exit 1 -fi iso=$(head -6 $i | tail -1 | tr -d '\r' | tr '_' '-' | sed -e 's/-/-r/') -cp=$(head -10 $i | tail -1 | tr -d '\r') #if test "$iso" = "en"; then #echo "skipped" #continue; @@ -35,12 +30,11 @@ cp=$(head -10 $i | tail -1 | tr -d '\r') dest=$2/values-${iso} mkdir -p $dest -# read strings, converted to UTF-8, stripping CR, +# read strings, stripping CR, # removing : at the end # replacing real & by & and stripping the other ones # and replacing WinHTTrack by HTTrack -cat "$i" | \ - iconv -f "$cp" -t "utf-8" \ +cat "$i" \ | tr -d '\r' \ | sed -e 's/\\r//g' \ | sed -e 's/:$//' -e 's/\* //g' -e 's/\.\.\.$//g' -e 's/\([[:space:]]\)[[:space:]]*/\1/g' -e 's/[[:space:]]*$//' \