Hi,
Searching for non-ascii words is bound to fail in most cases,
e.g. in an utf-8 environment (query in utf-8, target messages
mostly e.g. in iso-8859-1).
Any chances that this will be implemented?
For the time being and the benefit of others in the same
situation, here's my workaround:
#!/bin/sh
threads=
augment=
charset="`printf $LANG | cut -d . -f 2`"
fallback="windows-1252"
yorn() {
local ans
printf '%s %s ' "$1" "(yes/[no])"
read -e ans
case "$ans" in
y*|Y*) return 0;;
*) return 1;;
esac
}
printf '%s\n' "Enter mairix query:"
read -e query
test -z "$query" && exit 0
yorn "Retrieve thread(s)?" && threads="--threads"
yorn "Append message(s) to mfolder?" && augment="--augment"
mairix $threads $augment "$query"
queryx=`echo "$query" | iconv -f "$charset" -t "$fallback"`
if [ "$queryx" != "$query" ]; then
echo "trying $fallback"
mairix $threads --augment "$queryx"
fi
For me the default fallback is enough in most cases, but it could
be made interactive as well.
Ideas, suggestions for improvement welcome of course.
c
--
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org/
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Mairix-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mairix-users