Author Topic: -Solved- Latin-8859-1 and UTF-8 conversion drives me crazy!  (Read 2476 times)

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
-Solved- Latin-8859-1 and UTF-8 conversion drives me crazy!
« on: October 19, 2009, 10:22:39 AM »
Hi all,

can't figure this one out easily....

I have a UTF-8 formatted (according to Kate) document called danish.php.

Inside it has php code with translations written in Latin-8859. The special danish characters are all displayed as ?

It does not matter if the document is Latin-8859 or UTF-8, I just need to be able to see and edit the proper danish characters and not ?.

How on earth do I get by this problem?

TIA,
MBantz

« Last Edit: October 19, 2009, 12:13:16 PM by MBantz »

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2847
    • other projects...
Re: Latin-8859-1 and UTF-8 conversion drives me crazy!
« Reply #1 on: October 19, 2009, 10:33:40 AM »
has your system been set to Danish and/or have you tried already the last note (in red) mentioned here?

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1516
    • PCLinuxOS.nl
Re: Latin-8859-1 and UTF-8 conversion drives me crazy!
« Reply #2 on: October 19, 2009, 10:41:14 AM »
In Firefox you can choose all kind of character sets, maybe you can use source view.
just 2 cents........

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Latin-8859-1 and UTF-8 conversion drives me crazy!
« Reply #3 on: October 19, 2009, 12:12:48 PM »
Thanks a bunch Pinoc! That worked, that is - I can convert the document to Latin-1 and the danish characters display fine. Next thing is to convert them to uft-8 and set the encoding in the php file, should be no problem :-)

Do you have any web-references to this issue - ie. pitfalls in character encoding or just what this 'old-style' means? I'm a nerd for details :-)

again thanks,

cheers,
MBantz



has your system been set to Danish and/or have you tried already the last note (in red) mentioned here?

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2847
    • other projects...
Re: -Solved- Latin-8859-1 and UTF-8 conversion drives me crazy!
« Reply #4 on: October 19, 2009, 03:10:11 PM »
Hi MBantz,

unfortunately I have no web reference and there are still some issues which are unclear to me. For example some diacritics are displayed correctly in a gnome-based WM but not in a KDE-konsole. Anyway, utf-8 is the default and should be used as a standard, eventually the 'old compatibility mode' will disappear and utf-8 should do everything fine. Apparently, we are not there yet  ::)  But at least it works for you now, and that is a good start...  ;)

regards,
-pinoc

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: -Solved- Latin-8859-1 and UTF-8 conversion drives me crazy!
« Reply #5 on: October 19, 2009, 05:13:01 PM »
Thanks again Pinoc,

After changing my KDE to the 'old-style' the diacritics was fine in the documents I needed to edit - but all the diacritics I use in filenames in my system and so was then messed up - so I changed the necessary files (used iconv to change to utf-8) and went back to the 'new-style' (whatever that is :-). The files I changed has kept the UTF-8 encoding and show the diacritics fine as expected,

looked at utf-8 in wikipedia, it's 1-4 bytes long, and can include byte-order-mark and other peculiarities - but no description about any 'old versus new' encoding style - still trying to figure this out,

cheers,
MBantz