<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body><div dir="auto">Hi Stephan,<br><br>Have a go with SWORD SVN.<br><br>I wonder if ICU detection in trunk can handle the latest versions of libicu-dev on your Ubuntu box.<br><br>svn co <a href="https://crosswire.org/svn/sword/trunk">https://crosswire.org/svn/sword/trunk</a> sword<br><br>Thanks for looking into this.<br><br>Also, you may wish to compile the examples/cmdline/search.cpp as is and see if you get the same results.<br><br>Blessings,<br><br>Troy</div><br><br><div class="gmail_quote"><div dir="auto">On April 24, 2023 9:58:48 PM MST, Patrick Stephan <pstephan1187@gmail.com> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div name="messageBodySection">
<div dir="auto">If it helps... I am attempting to compile the library with ICU:<br>
```<br>
RUN cd sword-1.9.0 && ./usrinst.sh --enable-shared --with-icu --with-icuregex<br>
```<br>
<br>
However, it would appear that the compilation process is not detecting ICU correctly.<br>
<br>
Here are all the libraries being installed via apt-get on top of the base Ubuntu 22.04 image (I incorrectly mentioned before that it was Ubuntu 20.04):<br>
<br>
gnupg gosu curl ca-certificates zip unzip git<br>
supervisor sqlite3 libcap2-bin libpng-dev python2<br>
dnsutils subversion build-essential autotools-dev<br>
pkg-config libz-dev libclucene-dev libicu-dev<br>
libcurl4-gnutls-dev libtool m4 automake cmake zlib1g-dev<br>
<br>
And here is the output of the `./usrinst.sh --enable-shared --with-icu --with-icuregex` command:<br>
<br>
checking build system type... aarch64-unknown-linux-gnu<br>
checking host system type... aarch64-unknown-linux-gnu<br>
checking target system type... aarch64-unknown-linux-gnu<br>
checking for a BSD-compatible install... /usr/bin/install -c<br>
checking whether build environment is sane... yes<br>
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p<br>
checking for gawk... no<br>
checking for mawk... mawk<br>
checking whether make sets $(MAKE)... yes<br>
checking whether make supports nested variables... yes<br>
checking for gcc... gcc<br>
checking whether the C compiler works... yes<br>
checking for C compiler default output file name... a.out<br>
checking for suffix of executables...<br>
checking whether we are cross compiling... no<br>
checking for suffix of object files... o<br>
checking whether we are using the GNU C compiler... yes<br>
checking whether gcc accepts -g... yes<br>
checking for gcc option to accept ISO C89... none needed<br>
checking whether gcc understands -c and -o together... yes<br>
checking whether make supports the include directive... yes (GNU style)<br>
checking dependency style of gcc... gcc3<br>
checking for g++... g++<br>
checking whether we are using the GNU C++ compiler... yes<br>
checking whether g++ accepts -g... yes<br>
checking dependency style of g++... gcc3<br>
checking how to print strings... printf<br>
checking for a sed that does not truncate output... /usr/bin/sed<br>
checking for grep that handles long lines and -e... /usr/bin/grep<br>
checking for egrep... /usr/bin/grep -E<br>
checking for fgrep... /usr/bin/grep -F<br>
checking for ld used by gcc... /usr/bin/ld<br>
checking if the linker (/usr/bin/ld) is GNU ld... yes<br>
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B<br>
checking the name lister (/usr/bin/nm -B) interface... BSD nm<br>
checking whether ln -s works... yes<br>
checking the maximum length of command line arguments... 1572864<br>
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop<br>
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop<br>
checking for /usr/bin/ld option to reload object files... -r<br>
checking for objdump... objdump<br>
checking how to recognize dependent libraries... pass_all<br>
checking for dlltool... dlltool<br>
checking how to associate runtime and link libraries... printf %s\n<br>
checking for ar... ar<br>
checking for archiver @FILE support... @<br>
checking for strip... strip<br>
checking for ranlib... ranlib<br>
checking command to parse /usr/bin/nm -B output from gcc object... ok<br>
checking for sysroot... no<br>
checking for a working dd... /usr/bin/dd<br>
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1<br>
checking for mt... no<br>
checking if : is a manifest tool... no<br>
checking how to run the C preprocessor... gcc -E<br>
checking for ANSI C header files... yes<br>
checking for sys/types.h... yes<br>
checking for sys/stat.h... yes<br>
checking for stdlib.h... yes<br>
checking for string.h... yes<br>
checking for memory.h... yes<br>
checking for strings.h... yes<br>
checking for inttypes.h... yes<br>
checking for stdint.h... yes<br>
checking for unistd.h... yes<br>
checking for dlfcn.h... yes<br>
checking for objdir... .libs<br>
checking if gcc supports -fno-rtti -fno-exceptions... no<br>
checking for gcc option to produce PIC... -fPIC -DPIC<br>
checking if gcc PIC flag -fPIC -DPIC works... yes<br>
checking if gcc static flag -static works... yes<br>
checking if gcc supports -c -o file.o... yes<br>
checking if gcc supports -c -o file.o... (cached) yes<br>
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes<br>
checking whether -lc should be explicitly linked in... no<br>
checking dynamic linker characteristics... GNU/Linux ld.so<br>
checking how to hardcode library paths into programs... immediate<br>
checking whether stripping libraries is possible... yes<br>
checking if libtool supports shared libraries... yes<br>
checking whether to build shared libraries... yes<br>
checking whether to build static libraries... yes<br>
checking how to run the C++ preprocessor... g++ -E<br>
checking for ld used by g++... /usr/bin/ld<br>
checking if the linker (/usr/bin/ld) is GNU ld... yes<br>
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes<br>
checking for g++ option to produce PIC... -fPIC -DPIC<br>
checking if g++ PIC flag -fPIC -DPIC works... yes<br>
checking if g++ static flag -static works... yes<br>
checking if g++ supports -c -o file.o... yes<br>
checking if g++ supports -c -o file.o... (cached) yes<br>
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes<br>
checking dynamic linker characteristics... (cached) GNU/Linux ld.so<br>
checking how to hardcode library paths into programs... immediate<br>
checking whether byte ordering is bigendian... no<br>
checking for pkg-config... /usr/bin/pkg-config<br>
checking pkg-config is at least version 0.9.0... yes<br>
checking for CLUCENE2... yes<br>
checking whether to enable maintainer-specific portions of Makefiles... no<br>
checking for compress in -lz... yes<br>
checking for library containing regexec... none required<br>
configure: Using system regex.h<br>
checking for cppunit-config... no<br>
checking for Cppunit - version >= 1.8.0... checking for pkg-config... (cached) /usr/bin/pkg-config<br>
checking pkg-config is at least version PKG_CONFIG... yes<br>
checking for icu-config... no<br>
*** The icu-config script installed by icu could not be found<br>
*** compiling without ICU support<br>
checking for curl-config... /usr/bin/curl-config<br>
curl found - remote install options available<br>
clucene 2.x found - lucene searching options available<br>
checking for main in -lxapian... no<br>
checking for vsnprintf... yes<br>
checking compiler warnings<br>
WARNING_CHECK: -Wno-address<br>
WARNING_CHECK: -Wno-nonnull-compare<br>
WARNINGS_OFF: -Wno-address -Wno-nonnull-compare<br>
./configure: line 18206: test: too many arguments<br>
checking that generated files are newer than configure... done<br>
configure: creating ./config.status<br>
config.status: creating Makefile<br>
config.status: creating lib/Makefile<br>
config.status: creating tests/Makefile<br>
config.status: creating tests/testsuite/Makefile<br>
config.status: creating tests/cppunit/Makefile<br>
config.status: creating utilities/Makefile<br>
config.status: creating examples/Makefile<br>
config.status: creating examples/cmdline/Makefile<br>
config.status: creating examples/tasks/Makefile<br>
config.status: creating utilities/diatheke/Makefile<br>
config.status: creating sword.pc<br>
config.status: creating include/swversion.h<br>
config.status: creating sword.spec<br>
config.status: creating include/config.h<br>
config.status: executing depfiles commands<br>
config.status: executing libtool commands<br>
<br>
<br>
Configuration:<br>
<br>
Settings:<br>
LIBDIR: /usr/lib<br>
DEBUG: yes<br>
PROFILE: no<br>
BUILD TESTS: yes<br>
BUILD EXAMPLES: no<br>
BUILD UTILITIES: yes<br>
STRIP LOG DEBUG: no<br>
STRIP LOG INFO: no<br>
<br>
Dependencies for standard use:<br>
REGEX: yes<br>
ZLIB: yes<br>
LIBICU: no<br>
LIBCURL: yes<br>
CLUCENE-CORE: yes 2.x<br>
<br>
Optional / Experimental:<br>
LIBCURL SFTP: yes<br>
BZIP2: no<br>
XZ: no<br>
ICUSWORD: no<br>
ICU-REGEX: requested; but using ICU not enabled<br>
CXX11-REGEX: no<br>
CXX11-TIME: yes<br>
XAPIAN-CORE: no<br>
GAPI: no<br>
<br>
<br>
<br>
Configured to NOT write a global /etc/sword.conf on 'make install'.<br>
If this is the first time you've installed sword, be sure to run<br>
'make install_config' if you would like a basic configuration installed<br>
<br>
Next you might try something like:<br>
<br>
make<br>
sudo make install<br>
# (and optionally)<br>
sudo make install_config<br>
make register<br>
<br>
--------------------------------------------<br>
<br>
I think the issue has to do with the changes in the ICU package in more recent versions of Ubuntu, but It's getting too late for me to further investigate. I'll keep digging tomorrow unless someone with deeper knowledge replies with the answer.<br></div>
</div>
<div name="messageSignatureSection"><br>
- Patrick</div>
<div name="messageReplySection">On Apr 24, 2023 at 11:07 PM -0500, Patrick Stephan <pstephan1187@gmail.com>, wrote:<br>
<blockquote type="cite">
<div name="messageBodySection">
<div dir="auto">So I've been digging into this a bit, and it would appear that the `toUpper()` method on the SWBuf class isn't working. I did a little hacking on the SWModule class and dropped in some debugging `printf` calls to see what was going on and why I wasn't getting my expected results. Here are I print out the word being queried:<br>
<br>
```<br>
printf("word check: %s\n", words[i].toUpper().c_str());<br>
```<br>
<br>
And here is the result:<br>
<br>
```<br>
word check: God<br>
```<br>
<br>
I'm doing this in between lines 771 and 772 in `swmodule.cpp`. I did the same type of thing on the `textBuf` in the search method and no casing is changed. Any thoughts on all this?<br>
<br>
I am wondering if it has to do with the more modern OS that I am using. I am attempting this on Ubuntu 20.04, and Sword 1.9.0 (which is the latest version best I can tell) is over 2 years old.<br>
<br>
That brings me to the next question: What is the development status on this? Is it being actively worked on? I would be willing to get involved, but I am only just now learning C/C++, So I would need some hand-holding, so-to-speak, to get me up to speed.<br>
<br></div>
</div>
<div name="messageSignatureSection"><br>
- Patrick</div>
<div name="messageReplySection">On Apr 19, 2023 at 10:32 AM -0500, Patrick Stephan <pstephan1187@gmail.com>, wrote:<br>
<blockquote type="cite">
<div name="messageBodySection">
<div dir="auto"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">I am new to c/c++ and to this library, so I could be misunderstanding how the module search system works, but I think I may have found a bug?</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Here is my code:</span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">```</span><span style="font-size: 14px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"vector"</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"swmgr.h"</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"swmodule.h"</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"markupfiltmgr.h"</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"modules.h"</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"php_sword.h"</span><span style="font-size: 16px"><br></span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#if </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">defined(USECXX11REGEX)</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px"><regex></span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#ifndef </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">REG_ICASE</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#define </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">REG_ICASE std::regex::icase</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#endif</span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px">#elif defined(USEICUREGEX)</span><span style="font-size: 14px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px"><unicode/regex.h></span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#ifndef </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">REG_ICASE</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#define </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">REG_ICASE UREGEX_CASE_INSENSITIVE</span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#endif</span><span style="font-size: 14px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#else</span><span style="font-size: 14px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#include </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px"><regex.h></span><span style="font-size: 16px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">#endif</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#d19a66;font-family:JetBrains Mono, monospace;font-size: 14px">using namespace</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">::sword;</span><span style="font-size: 16px"><br></span><span style="font-size: 16px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// unrelated function here...</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 14px">int </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">sword_search_module(</span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 16px">char</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">* module_name, </span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 16px">char</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">* search_string) {</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> SWMgr mgr(</span><span style="color:#d19a66;font-family:JetBrains Mono, monospace;font-size: 16px">new </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">MarkupFilterMgr(FMT_XHTML));</span><span style="font-size: 16px"><br></span><span style="font-size: 16px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Headings", "On");</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Strong's Numbers", "Off");</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Lemmas", "Off");</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Greek Accents", "Off");</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Footnotes", "On");</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px">// mgr.setGlobalOption("Cross-references", "On");</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Headings"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Strong's Numbers"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Lemmas"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Greek Accents"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Footnotes"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> mgr.setGlobalOption(</span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Cross-references"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">"Off"</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">);</span><span style="font-size: 16px"><br></span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> SWModule *module = mgr.getModule(module_name);</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">/*</span><span style="font-size: 16px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * >=0 - regex; (for backward compat, if > 0 then used as additional REGEX FLAGS)</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * -1 - phrase</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * -2 - multiword</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * -3 - entryAttrib (eg. Word//Lemma./G1234/) (Lemma with dot means check components (Lemma.[1-9]) also)</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * -4 - clucene</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> * -5 - multilemma window; flags = window size</span><span style="font-size: 14px"><br></span><span style="font-family:JetBrains Mono, monospace;font-size: 14px"> */</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> ListKey results = module</span><span style="color:#e5c07b;font-family:JetBrains Mono, monospace;font-size: 16px">-></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">search(search_string, -</span><span style="color:#d19a66;font-family:JetBrains Mono, monospace;font-size: 16px">2</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">, REG_ICASE);</span><span style="font-size: 16px"><br></span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> </span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 16px">for </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">(</span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 16px">int </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">i = </span><span style="color:#d19a66;font-family:JetBrains Mono, monospace;font-size: 16px">0</span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">; i < results.getCount(); i++) {</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> module</span><span style="color:#e5c07b;font-family:JetBrains Mono, monospace;font-size: 16px">-></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">setKey(results.getElement());</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> std::cout</span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> << results.getText()</span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> << </span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 16px">" - "</span><span style="font-size: 16px"><br></span><span style="color:#98c379;font-family:JetBrains Mono, monospace;font-size: 14px"> </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px"><< module</span><span style="color:#e5c07b;font-family:JetBrains Mono, monospace;font-size: 16px">-></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">renderText()</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> << std::endl;</span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> results.increment();</span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> }</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px"> </span><span style="color:#c678dd;font-family:JetBrains Mono, monospace;font-size: 16px">return </span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 16px">results.getCount();</span><span style="font-size: 16px"><br></span><span style="color:#abb2bf;font-family:JetBrains Mono, monospace;font-size: 14px">}</span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">```</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Given that code, If I run a search for "so loved god" against the KJV module, I get 3 verses: Hosea 2:23, Hosea 3:1, and I Timothy 6:2. I'm not sure why I Tim 6:2 is listed because it contains niether "so", nor "god". There are also a slew of verses that are expected to show up but don't (like John 3:16), presumably because the case-insensitive flag `SEARCHFLAG_STRICTBOUNDARIES | REG_ICASE</span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">` isn't working. BTW, I am compiling my code against Ubuntu 20.04 and `REG_ICASE` resolves to `2`.</span><span style="font-size: 14px"><br></span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Also, If I include the `SEARCHFLAG_STRICTBOUNDARIES` flag like so: `SEARCHFLAG_STRICTBOUNDARIES | REG_ICASE`, and search for 'god so loved', I get no results, further enforcing my theory that the `REG_ICASE` flag isn't doing anything. If I search for 'God so loved' then I get 6 results. I am, however expecting 10. Here are the verses that are not returned that I expect to:</span></div>
<ul>
<li style="font-size: 14px"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Nehemiah 13:26</span></li>
<li style="font-size: 14px"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Galatians 2:20</span></li>
<li style="font-size: 14px"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">2 Peter 1:17</span></li>
<li style="font-size: 14px"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">I John 4:10</span></li>
</ul>
<div dir="auto"><span style="color:#ffffff;font-family:system-ui;font-size: 14px">I have also tried with replacing the if/else block at the top with just `#include "regex.h"`. But that makes no difference.</span><span style="font-size: 14px"><br></span><span style="color:#ffffff;font-family:system-ui;font-size: 14px">Thank you for any help</span></div>
</div>
<div name="messageSignatureSection"><br>
- Patrick</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote></div><div dir="auto"><div class='k9mail-signature'>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></body>
</html>