Re: [Bug 178173] Re: Font problems with .tex files and special (danish) characters

2007-12-24 Thread Norbert Preining
Dear Christian,

On Mo, 24 Dez 2007, Christian Dalbjerg wrote:
 Thanks alot for all your work, its appreciated! When entering locale
 in ubuntu 7.10 I get LANG=en_DK.UTF-8, which causes me no problems
 since kile is set to use encoding KDEDefault, which im guessing is
 refering to what =DK.UTF-8 is.

more or less, =UTF-8, locales consist of
aa[_BB].
aa ... 2 letter language code
BB ... 2(?) letter country code
the _BB is not necessary
 ... character encoding

So that means that your are working with English language in Danemark,
with UTF-8 encoding.

 But when entering locale in ubuntu 8.04 I get LANG=C. Is it then

Ups, well, then everything is though to be in ASCII.

 correctly understood that the problem arrises because kile is trying
 to open the files as if they were encoded in whatever LANG=C means?

ASCII

 And what to do about it? Im not sure, but I think the the bug report
 should be filed against ubuntu in general?

See below ...

 I mean, it would be nice if kile could autodetect the encoding, but it
 isn't really a bug in kile, more like a feature request. 

Right, feature request.

 I have installed ubuntu 7.10 and 8.04 the exact same way so I don't
 understand why the LANG settings are different. It would be nice if
 this was changed back before final release.

Sorry I cannot help you here since I am Debian maintainer and only
helping out on the Ubuntu side a bit. I don't know nothing about the
internals of the installer and why the LOCALE settings weren't done
right. But it is definitely worth a bug report.

 In the meanwhile, which one of the two options do you recommend?
 The first one seems the easiest, is there any reason to prefer the second?

I am not sure about the way to fix it on Ubuntu, but I would suggest:
sudo /usr/sbin/dpkg-reconfigure -plow locales
then select the en_DK.UTF-8 and maybe some others you might have use
for. And AFAIR at the end it should ask you about the default locale for
your system. After that restarting the computer (or restarting the
display manager gdm/kdm/whatever-dm) should give you the right
setting. If not, there might be something saved in your local
configuration files in ~/.?something.

But that is not for me to debug.

I hope that helped a bit

Best wishes

Norbert

---
Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology
Debian Developer [EMAIL PROTECTED] Debian TeX Group
gpg DSA: 0x09C5B094  fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
---
And wow! Hey! What's this thing coming towards me very
fast? Very very fast. So big and flat and round, it needs a
big wide sounding word like... ow... ound... round...
ground! That's it! That's a good name - ground!
I wonder if it will be friends with me?
 --- For the sperm whale, it wasn't.
 --- Douglas Adams, The Hitchhikers Guide to the Galaxy

-- 
Font problems with .tex files and special (danish) characters
https://bugs.launchpad.net/bugs/178173
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 178173] Re: Font problems with .tex files and special (danish) characters

2007-12-23 Thread Norbert Preining
Hi Christian,

I checked both files and:
- both files are saved in UTF8 encoding
- both files compile fine without any warning on my system

Can you explain what problems you had with these files?

Is it only that kile and texmaker cannot work with them or do you have
problems compiling the files with latex?

On So, 23 Dez 2007, Christian Dalbjerg wrote:
 By the way, I know almost nothing of character sets and the like.
 What I know is that i can't use my .tex files on some other distributions
 or on windows, and seemingly not on the newest ubuntu either! I thought
 .tex files were just plain ASCII files, and so there should be no
 problems with compatibilty between different systems and platforms. 

You CAN use plain ascii files, but if you want to key in characters of
your national script (or mine, or anything else which needs more then
ASCII) you have two options:
- use tex commands for your symbols like \ae \o etc
- use different character encodings

I cannot explain the full details, that would be too long. But your
files are saved in UTF8 which is an international standard and work
quite nice with latex. So no problems here.

As I said, I also could compile the file on my system, and I am sure
that it will work on Windows, too.

So please again, what are the problems you have with these two files?


All the best and a peaceful christmas

Norbert

---
Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology
Debian Developer [EMAIL PROTECTED] Debian TeX Group
gpg DSA: 0x09C5B094  fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
---
KINGSTON BAGPUISE (n.)
A forty-year-old sixteen-stone man trying to commit suicide by
jogging.
--- Douglas Adams, The Meaning of Liff

-- 
Font problems with .tex files and special (danish) characters
https://bugs.launchpad.net/bugs/178173
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 178173] Re: Font problems with .tex files and special (danish) characters

2007-12-23 Thread Norbert Preining
Hi Christian,

On So, 23 Dez 2007, Christian Dalbjerg wrote:
 1. Open the files with kile; kile shows Ã?? instead of 'æ', Ã?? instead of 
 'ø' and Ã¥ instead of 'å'. I can compile the files and get the correct 
 output, but the .tex file is messed up with strange symbols. This is of 
 course not acceptable, as I work with these files on a daily basis. 

Ok, I installed kile and see what is going on. Your ENVIRONMENT is not
set up for UTF8 but for some national encoding, if you enter
locale
on the cmd line of a shell you will see something like
LANG=xx.Y
where the Y is the encoding. Maybe you have as Y
ISO-8859-15
which is ok.

BUT: Your tex files are encoded in utf8. Kile seems to have the problem
that it cannot autodetect the encoding of files automatically.

Now kile opens your file as ISO-8859-15 encoding so that there appear
that strange double letters (because 'æ' is encoded as 2 bytes in utf8).

 2. Open the .tex file with gedit, and copy the code into kile. Now the
letters display correctly in the editor, but I can't compile the files:
I am getting errors like the ones posted in the original report.

gedit CAN auto-detect that encoding so opens your tex files in utf8 and
shows you the right characters. Now when you copy from gedit to kile you
enter a 'æ' in national encoding into the kile file. Now if you save
that and compile it with latex it breaks because you have
\usepackage[utf8]{inputenc}
and the 'æ' in your local encoding is NOT utf8!!


So all this is to be expected, but the problem that kile is too stupid
to autodetect encodings. Maybe this could be filed as a bug report
against kile.

You have the following options, depending on HOW you want to save your
files:

1) you want to use utf8 as default encoding for your tex files
 
  tell kile that files should always be treated as utf8: 
  Settings - Configure Kile
 Editor - Open/Save
   change Encoding to Unicode ( utf8 )

   from now on all files opened in kile will be treated as utf8
   inputenc. So don't forget theusepackage line as above.

2) you switch to iso-8859-15 as default encoding for your tex files

   leave kile alone
   leave gedit alone
   edit your tex files to include
 \usepackage[latin9]{inputenc}   % or latin1
   You should recode your tex files to latin9 with
 recode utf8..recode file.tex
   so that your 'æ' gets translated from utf8 to latin1/9.


I hope that all this is a bit clearer now.

Ah yes, why you did have problems on other computers: You copied the 'æ'
from gedit into kile. kile saved it in your national encoding, but the
tex file specifies inputencoding utf8, thus it breaks on other systems,
too. 

So to sum it up: The real bug is with kile which cannot autodetect the
encoding of files.

Best wishes

Norbert

---
Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology
Debian Developer [EMAIL PROTECTED] Debian TeX Group
gpg DSA: 0x09C5B094  fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
---
FORDSix pints of bitter. And quickly please, the
world's about to end.
BARMAN  Oh yes, sir? Nice weather for it.
 --- Douglas Adams, The Hitchhikers Guide to the Galaxy

-- 
Font problems with .tex files and special (danish) characters
https://bugs.launchpad.net/bugs/178173
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs