Discussion:
Delphi 2007: Danish letters in source code
(too old to reply)
Jacob Havkrog
2007-11-08 16:26:34 UTC
Permalink
Hi group.

Danish letters æøå ÆØÅ are sometimes displayed wrongly in the source code
editor.As

Ê

instead oif "æ". I've seen the problem go away and then come back. Does
anybody know whats going on?

Thanks
Jacob
Peter Below (TeamB)
2007-11-08 18:31:37 UTC
Permalink
Post by Jacob Havkrog
Hi group.
Danish letters æøå ÆØÅ are sometimes displayed wrongly in the source
code editor.As
æ
instead oif "æ". I've seen the problem go away and then come back.
Does anybody know whats going on?
If you work with non-ASCII characters, make sure to set the editor to
use UTF-8 encoding (right-click on the editor window, the context menu
has a submenu "file format" or "file encoding" (I have a german IDE, so
am extrapolating here). Unfortunately you have to do this for every
open file, then do a save all. If you see problems check the encoding
setting again, the IDE seems to forget it sometimes.
--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
Jacob Havkrog
2007-11-09 07:34:15 UTC
Permalink
Hi

Since Delphi 1, I've had no problems with Danish letters in the source code
in comments or string constanst. They are part of the ASCII charset as
letters 230, 248, 229, 198, 216, 197 in the default fonts. So I guess I
don't need to use the UTF-8 file format.

With Delphi 2007, the danish letters are garbled, both in comments and
string constants.

What in Delphi 5 looks like:

Sammentælling

is now:

SammentÊlling

Of course, I can just do a global search and replace, but can I be sure, it
won't happen again?

I think this is a pretty bad bug, if there is no way to prevent it from
happening!

Thanks
Jacob
Jacob Havkrog
2007-11-09 07:54:19 UTC
Permalink
Now I'm confused..

I change the file file format of a source file from UTF8 to ANSI.

I do a global replace to change "Å," back to "ø" using Gexpert.

Nothing happens, ie the "Å," is still there.

I close the file and open it again.

Now >all< the Danish letters are back again, not only the "ø", that I tried
to fix.

The file format is back to UTF8.

?!?!

Thanks
Jacob
Peter Below (TeamB)
2007-11-09 17:50:34 UTC
Permalink
?!?!
Those are the mysteries of life <g>.
--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
Loading...