[opensuse] Not all files saved as UTF-8 (some in ASCII)
Does anyone knows how can I save all files in UTF-8 no matter what kind of characters are in the file? This is what is happening: oscar@hedera:~> echo "Tést">test2;file test2 test2: UTF-8 Unicode text oscar@hedera:~> echo "Test">test;file test test: ASCII text (both files should be in UTF-8). This is what I have now: oscar@hedera:~> cat /etc/SuSE-release openSUSE 12.1 (i586) VERSION = 12.1 CODENAME = Asparagus oscar@hedera:~> export declare -x COLORTERM="1" declare -x CONFIG_SITE="/usr/share/site/i686-pc-linux-gnu" declare -x CPU="i686" declare -x CSHEDIT="emacs" declare -x FROM_HEADER="" declare -x GPG_TTY="/dev/pts/0" declare -x G_BROKEN_FILENAMES="1" declare -x G_FILENAME_ENCODING="@locale,UTF-8,ISO-8859-15,CP1252" declare -x HISTSIZE="1000" declare -x HOME="/home/oscar" declare -x HOST="hedera" declare -x HOSTNAME="hedera" declare -x HOSTTYPE="i386" declare -x INPUTRC="/home/oscar/.inputrc" declare -x JAVA_BINDIR="/usr/lib/jvm/java/bin" declare -x JAVA_HOME="/usr/lib/jvm/java" declare -x JAVA_ROOT="/usr/lib/jvm/java" declare -x JDK_HOME="/usr/lib/jvm/java" declare -x JRE_HOME="/usr/lib/jvm/jre" declare -x LANG="es_ES.UTF-8" declare -x LC_CTYPE="es_ES.UTF-8" TIA, -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 5 May 2012 13:58:33 +0200, Oscar Curero <flextron@gmail.com> wrote:
Does anyone knows how can I save all files in UTF-8 no matter what kind of characters are in the file?
You can't. Characters from the ASCII range have the same encoding as the corresponding characters in the unicode range so they are undistinguishable. That also means that such files are perfectly readable on a system that uses unicode encoding. Might I ask why you want all files to have utf-8 encoding. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Oscar Curero
-
Philipp Thomas