Sorry, this was my first attempt ever to contact a mailing list. I thought
this was the way to do it. I have now subscribed and hope I have done it the
right way.
Ulrich Ruess
Unfortunately acroread cannot handle UTF-8. Is there a way around? Since the other pdf-viewers have problems rotating stuff, sometimes acroread is the only way out.
To get Chinese working I set RC_LANG="en_US.UTF-8" and RC_LC_TYPE="zh_TW.UTF-8" in /etc/sysconfig/language. I do not have anything
Can you describe in more detail please what problem occurs when trying to use acroread in UTF-8? like ./xcin or similar. All the other things like fonts, input-servers etc. I had known before and installed. What I did not know was how to start xcin. After this, when starting acroread from the panel, the icon flashes somewhere on the screen for some time and then stops. To find out some more I tried to start acroread in a console. Result as below: uli@p4:~> acroread Warning: charset "UTF-8" not supported, using "ISO8859-1". Aborted When I comment RC_LC_CTYPE="zh_TW.UTF-8" out, acroread works again, but-of course- no more xcin. I then "googled" and found that it is a known problem with acroread not to accept UTF-8. Unfortunately I could find no solution. I also did the on-line update. This did not change anything>>>>>>>> I am running in ja_JP.UTF-8 locale always and didn't notice any problems. There are many locales where Acroread itself has problems and doesn't work correctly. but the script used to start Acroread uses LANG=en_US and LC_NUMERIC=POSIX: LANG="en_US" export LANG LC_NUMERIC=POSIX export LC_NUMERIC (see /usr/X11R6/bin/acroread). Therefore one doesn't notice any problems even when running in UTF-8 locales.
>>>> I do not yet understand scripting, but I checked the script and the above mentioned lines are there.
Maybe you are not using the SuSE package for Acroread?
>>>I do not yet understand the process of adding software to a Linux system well enough to even consider using something that is not from the official distribution.
If you are not using the SuSE package, your start script probably
doesn't set LANG and LC_NUMERIC.
By the way, it may be better to use the m17n mailing list
for such questions:
http://www.suse.de/~mfabian/mailing-list.html
--
Mike Fabian
Ulrich Ruess
Sorry, this was my first attempt ever to contact a mailing list. I thought this was the way to do it. I have now subscribed and hope I have done it the right way.
Yes. Welcome!
>To get Chinese working I set RC_LANG="en_US.UTF-8" and RC_LC_TYPE="zh_TW.UTF-8" in /etc/sysconfig/language.
[...]
uli@p4:~> acroread Warning: charset "UTF-8" not supported, using "ISO8859-1". Aborted
[...]
I am running in ja_JP.UTF-8 locale always and didn't notice any problems. There are many locales where Acroread itself has problems and doesn't work correctly. but the script used to start Acroread uses LANG=en_US and LC_NUMERIC=POSIX:
LANG="en_US" export LANG LC_NUMERIC=POSIX export LC_NUMERIC
(see /usr/X11R6/bin/acroread). Therefore one doesn't notice any problems even when running in UTF-8 locales.
The problem is that this script does not change LC_CTYPE but leaves
it as it is, zh_TW.UTF-8 in your case.
It can be fixed by setting LC_CTYPE to POSIX as well, i.e.
replace the above 4 lines by:
LANG="en_US"
export LANG
LC_CTYPE=POSIX
export LC_CTYPE
LC_NUMERIC=POSIX
export LC_NUMERIC
Or copy the attached script to /usr/X11R6/bin/acroread.
#!/bin/sh
#
ver=5.0.7
install_dir=/usr/X11R6/lib/Acrobat5/Reader
#
# Prepend a colon separated environment variable
# $1 string to be prepended
# $2 environment variable
#
prepend()
{
if [ -z "$2" -o "$2" = "$1" ] ; then
echo "$1"
else
first="`expr "$2" : '\([^:]*\):'`"
if [ "$first" = "$1" ] ; then
echo "$2"
else
echo "${1}:${2}"
fi
fi
}
#
# Tests the version file in an installation directory.
#
test_install_dir()
{
if [ "$1" -a -f "$1/AcroVersion" ] \
&& [ "`cat $1/AcroVersion 2>/dev/null`" = "$ver" ] ; then
return 0
else
return 1
fi
}
#
# Get the current working directory.
# Try to avoid automounter directories by checking
# if $HOME or $PWD is the same directory as pwd,
# and removing the automount directory component.
#
cwd="`pwd 2> /dev/null`"
if [ -z "$cwd" -o ! -d "$cwd" ] ; then
echo "ERROR: Cannot determine current directory."
exit 1
fi
if [ "$HOME" -a -d "$HOME" ] && [ "`cd / ; cd "$HOME" ; pwd`" = "$cwd" ] ; then
cwd="$HOME"
elif [ "$PWD" -a -d "$PWD" ] && [ "`cd / ; cd "$PWD" ; pwd`" = "$cwd" ] ; then
cwd="$PWD"
fi
if [ "$cwd" != / -a "${AUTOMOUNT_DIR=/tmp_mnt}" ] ; then
tmp="`expr "$cwd" : "$AUTOMOUNT_DIR"'\(.*\)'`"
if [ "$tmp" -a -d "$tmp" ] ; then
if [ "`cd / ; cd "$tmp" ; pwd`" = "`pwd`" ] ; then
cwd="$tmp"
fi
fi
fi
PWD="$cwd"
export PWD
#
# Setup ACRO_ARG0 to this script
#
arg0="$0"
if [ "$arg0" ] ; then
case "$arg0" in
/*) ;;
./*) arg0="$cwd/`expr "$arg0" : '\./\(.*\)'`" ;;
*) arg0="$cwd/$arg0" ;;
esac
ACRO_ARG0="$arg0"
export ACRO_ARG0
fi
#
# Try to find the installation directory
#
if ( test_install_dir "$install_dir" ) ; then
ACRO_INSTALL_DIR="$install_dir"
export ACRO_INSTALL_DIR
else
script="$arg0"
while [ "$script" ] ; do
install_dir="`dirname "$script"`"
if ( test_install_dir "$install_dir" ) ; then
ACRO_INSTALL_DIR="$install_dir"
export ACRO_INSTALL_DIR
break
fi
install_dir="`dirname "$install_dir"`"
if ( test_install_dir "$install_dir" ) ; then
ACRO_INSTALL_DIR="$install_dir"
export ACRO_INSTALL_DIR
break
fi
if [ -h "$script" ] ; then
new_script=`ls -l "$script" | sed 's/^.*-> *\(.*\) *$/\1/'`
if [ "$new_script" -a "`expr "$new_script" : '/.*'`" = 0 ] ; then
new_script="`dirname "$script"`/$new_script"
fi
script="$new_script"
else
break
fi
done
if ( test_install_dir "$ACRO_INSTALL_DIR" ) ; then
:
elif ( test_install_dir "$ACRO_HOME" ) ; then
ACRO_INSTALL_DIR="$ACRO_HOME"
export ACRO_INSTALL_DIR
else
echo "ERROR: Cannot find installation directory."
exit 1
fi
fi
#
# setup the configuration from uname
#
os_name=`uname -s`
if [ "$os_name" = "AIX" ] ; then
os_release=`uname -a | ( read name host minor major foo ; echo $major.$minor )`
else
os_release=`uname -r`
fi
case "$os_name" in
SunOS)
case "$os_release" in
4.1.3*|4.1.4*|4.1C)
ACRO_CONFIG=sparcsun
export ACRO_CONFIG
;;
5.*)
machine_type=`uname -p`
case "$machine_type" in
sparc)
ACRO_CONFIG=sparcsolaris
export ACRO_CONFIG
;;
intel|i386)
ACRO_CONFIG=intelsolaris
export ACRO_CONFIG
;;
ppc)
ACRO_CONFIG=ppcsolaris
export ACRO_CONFIG
;;
esac
;;
esac
;;
HP-UX)
case "$os_release" in
*09.0*|*10.*|*11.*)
ACRO_CONFIG=hppahpux
export ACRO_CONFIG
;;
*)
;;
esac
;;
AIX)
case "$os_release" in
4.*|5.*)
ACRO_CONFIG=rs6000aix
export ACRO_CONFIG
;;
*)
;;
esac
;;
Linux)
ACRO_CONFIG=intellinux
export ACRO_CONFIG
;;
esac
if [ -z "$ACRO_CONFIG" ] ; then
echo "The OS named $os_name version $os_release is currently not installed."
echo "Try running on an installed platform and connecting to your display."
echo "Installed platform(s) include the following:"
if [ -d "$ACRO_INSTALL_DIR"/sparcsolaris ] ; then
echo " SPARC/Solaris version 2.x"
fi
if [ -d "$ACRO_INSTALL_DIR"/hppahpux ] ; then
echo " HP/HP-UX version 9.0.x and 10.x"
fi
if [ -d "$ACRO_INSTALL_DIR"/rs6000aix ] ; then
echo " RS6000/AIX version 4.1.1, 4.2, 4.3, and 5.1"
fi
if [ -d "$ACRO_INSTALL_DIR"/intellinux ] ; then
echo " Intel/Linux"
fi
exit 1
fi
#
# Setup XKEYSYMDB
#
if [ -z "$XKEYSYMDB" -o ! -f "$XKEYSYMDB" ] ; then
if [ -f "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib/XKeysymDB" ] ; then
XKEYSYMDB="$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib/XKeysymDB"
export XKEYSYMDB
elif [ -f "$ACRO_INSTALL_DIR/XKeysymDB" ] ; then
XKEYSYMDB="$ACRO_INSTALL_DIR/XKeysymDB"
export XKEYSYMDB
fi
fi
#
# Prepend XFILESEARCHPATH
#
XFILESEARCHPATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/%T/%L/%N%S:$ACRO_INSTALL_DIR/$ACRO_CONFIG/%T/%l/%N%S:$ACRO_INSTALL_DIR/$ACRO_CONFIG/%T/%N%S" "$XFILESEARCHPATH"`"
export XFILESEARCHPATH
#
# Setup configuration specific environment variables
#
case "$ACRO_CONFIG" in
sparcsolaris)
LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib" "$LD_LIBRARY_PATH"`"
export LD_LIBRARY_PATH
if [ -z "$LC_CTYPE" ] ; then
LC_CTYPE="iso_8859_1"
export LC_CTYPE
fi
;;
hppahpux)
SHLIB_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib" "$SHLIB_PATH"`"
SHLIB_PATH="`prepend "/usr/lib/Motif1.2" "$SHLIB_PATH"`"
SHLIB_PATH="`prepend "/usr/lib/X11R5" "$SHLIB_PATH"`"
export SHLIB_PATH
;;
rs6000aix)
LIBPATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib" "$LIBPATH"`"
export LIBPATH
XNLSPATH=/usr/lib/X11/nls
export XNLSPATH
;;
intellinux)
LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib" "$LD_LIBRARY_PATH"`"
export LD_LIBRARY_PATH
LANG="en_US"
export LANG
LC_CTYPE=POSIX
export LC_CTYPE
LC_NUMERIC=POSIX
export LC_NUMERIC
;;
esac
DefaultPSRESPATH="$HOME/psres:$HOME/fonts:/usr/psres:$ACRO_INSTALL_DIR/$ACRO_CONFIG/fonts"
if [ -z "$PSRESOURCEPATH" ] ; then
PSRESOURCEPATH="$DefaultPSRESPATH"
else
PSRESOURCEPATH="$PSRESOURCEPATH":"$DefaultPSRESPATH"
fi
case "$PSRESOURCEPATH" in
::*|*::*|*::)
;;
*)
PSRESOURCEPATH="$PSRESOURCEPATH"::
;;
esac
export PSRESOURCEPATH
directory="`basename \"$ACRO_INSTALL_DIR\"`"
case "$directory" in
Reader)
cmd="acroread"
prod="Acrobat Reader"
;;
*)
cmd="acrobat"
prod="Acrobat 5.0"
;;
esac
#
# Set the command. Process any debug flags and exec.
#
ACRO_EXEC_CMD="$ACRO_INSTALL_DIR/$ACRO_CONFIG/bin/$cmd"
if [ "$1" = "-DEBUG" ] ; then
if [ $# = 1 ] ; then
export ACRO_EXEC_CMD
exec "$SHELL"
else
shift
exec ${1+"$@"} "$ACRO_EXEC_CMD"
fi
fi
if [ -f "$ACRO_EXEC_CMD" ] ; then
exec "$ACRO_EXEC_CMD" ${1+"$@"}
else
echo "ERROR: Cannot find $ACRO_EXEC_CMD"
echo " $prod not installed for this configuration, \"$ACRO_CONFIG\"."
exit 1
fi
--
Mike Fabian
Ulrich Ruess
>To get Chinese working I set RC_LANG="en_US.UTF-8" and RC_LC_TYPE="zh_TW.UTF-8" in /etc/sysconfig/language.
[...]
uli@p4:~> acroread Warning: charset "UTF-8" not supported, using "ISO8859-1". Aborted
[...]
I just added a similar workaround as for Acroread to the Netscape 4.x
package for SuSE Linux 9.0. See
http://www.suse.de/~mfabian/suse-cjk/netscape4.html
if you encounter problems when trying to run Netscape 4.x in UTF-8
locales.
--
Mike Fabian
participants (2)
-
Mike FABIAN
-
Ulrich Ruess