Hi Joerg,
Am Montag, 9. Oktober 2006 12:50 schrieb Joerg Toellner:
> Hi Thomas, Hi Julian,
>
> i searched now the beginning of the file for special characters with my
> Hexeditor. No, sir! The very first characters are many / (Slashes) which
> forms the normal header comment block (including the Authorname a.s.o.).
Did a check concerning the leading bytes story. Created a file with lf +
"hello wörld" using kate in utf-8 mode on Linux. Indeed there ar no special
bytes at the beginning. Only the ö is represanted by two bytes - just as
expected.
Than I took the same file with notepad and save it again. Notepad adds a magic
three byte sequence "EF BB EF" and of course makes a 0D 0A from the 0A
linefeed.
I know that this didn't help you. It's just check wether I remembered me
correctly.
Another trick maybe to edit the xml .pjd file and seach for utf-8 encoding
tags. I did something like this before some time and manually replace it by
the encoding tag I want. As the pjd is human readable - despite the fact that
I would prefer a good crime story - you can learn a bit about DB.
>
> Then i deleted the menubar from my DB project, saved it, removed the
> resources.cpp/.h files from the disk, loaded the project again (no menubar
> in the project treeview), saved it again (no new resources.cpp/.h are
> created), then inserted again the menubar, menus and menuitems from scratch
> manually and saved it (new resources.cpp/.h are created now) and looked
> again, and...
>
> The umlauts are again crappy (UTF-Format) in the now really new files. Even
> with the project encoding and sourcecode encoding settings set to
> ISO-8859-1.
>
> So, even if i regret, i came more and more to the point, that this must be
> considered a bug in DiaglogBlocks resourcefile code creation that dont take
> care of the project and sourcecode encoding settings.
I agree, ther should be no 2 byte chars in the file.
> I hope, Julian is reading with us here and maybe can and will contribute
> sth. to this problem. If he needs more information and/or the project sent
> to him, his wish will be my command. 
Be sure, he is reading and there will be a fix ...
Regards,
Thomas
> TIA
> Joerg
>
> _____
>
> Von: anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com
> [mailto: anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com] Im Auftrag von Thomas Zehbe
> Gesendet: Montag, 9. Oktober 2006 10:58
> An: anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com
> Betreff: Re: AW: [anthemion-devtools] Encoding Problem with "German
> Umlauts"
>
>
>
> Hi Joerg,
>
> Am Montag, 9. Oktober 2006 09:25 schrieb Joerg Toellner:
> > Hi Thomas, Hi Julian, Hi Group,
> >
> > a little catchup on my umlaut problem.
> >
> > As i reported before, in the "normal" Controls the german umlauts work
> > fine after regenerating with settings ISO-8859-1. Only in the
> > resources.cpp/.h, where my Menubar is located and code is generated for
> > from DB, it wont work, even with regenerating it and also after deleting
> > the .cpp/.h files completely and let them create them from DB from
> > scratch.
> >
> > After a little research i found out, that the umlauts appear fine in
> > DB-Editor and in MSVC-Editor. When i open it with a hex-editor i can see
> > that the Ü is represented by 2 bytes (C3 9C).
> >
> > The literal "Über" appears as "Ü&ber" (Hex: 22 C3 9C 26 62 65 72 22)
>
> That proved, that DB generates utf chars instead of 8859-1 code.
>
> > If i open the file in a normal Texteditor (e.g. Notepad) i get the crappy
> > characters too as exactly i get them in my wxApplication in the menubar.
>
> The editor takes each byte as an iso char just like the compiler does.
>
> > I now changed the a.m. crappy characters to Ü in my texteditor. Now i get
> > funny characters in db- and msvc-editor, but it works in my
> > wxApplications
>
> That shows, that both editors assume to get an utf encoded file! Have you
> look for an byte sequence at the beginning of the file with the hex editor?
>
> > menubar. So i have a solution for now, but that is not satisfying for the
> > future. This time i only have two places in the menubar (resources.cpp)
> > where i have to change it manually via a texteditor everytime i save my
> > project and have made changes in the Menubar/Resources.cpp Section, but
> > what, if i have another project with a lot of such things and/or forget
> > it to change before releasing a new version?
>
> I think DB has a tiny bug as it doesn't apply a changed encoding setting to
> the someway special app_resources file.
>
> > So i kindly ask, if there is another hint what i can do to solve this
> > problem permanently. Can this (duck and cover
) maybe considered a DB
> > bug in the resources creation code? (Sorry Julian, no offense here! - DB
> > is GREAT!!!)
>
> As I don't no anything about the app_resources case, is there a way to get
> completely rid of the definition in DB project file and then define a new
> one from scratch with the iso settings active?
>
> Maybe this would make your problem gone ...
> Regards,
>
> Thomas
>
> > Any more help appreciated. TIA!
> > Joerg
> >
> > _____
> >
> > Von: anthemion-devtools
<mailto:anthemion-devtools%40yahoogroups.com>
> > yahoogroups.com [mailto:anthemion-devtools
> > <mailto:anthemion-devtools%40yahoogroups.com> yahoogroups.com] Im Auftrag
> > von Thomas Zehbe Gesendet: Donnerstag, 5. Oktober 2006 18:27
> > An: anthemion-devtools
<mailto:anthemion-devtools%40yahoogroups.com>
> > yahoogroups.com Betreff: Re: AW: [anthemion-devtools] Encoding Problem
> > with "German Umlauts"
> >
> > > After regenerating and recompiling i get now my german umlauts in all
> > > button labels, captions and so on. Set project and source encoding to
> > > ISO-8859-1. Thank you so much.
> >
> > Fine that it worked.
> >
> > > Only in the menubar (located in resources.cpp/.h) there is a big letter
> > > "Ü" that wont appear correctly. Even after regenerate the .h and .cpp
> > > file. It is between "////
begin wscResources resource functions" and
> > > "////
end wscResources resource functions", so it should be regenerated
> > > i think.
> >
> > As I never with resources (I don't even now to generate this file despite
> > the fact that there's an app_resources.h/.cpp default named in the
> > settings) I only have two (or three) hints.
> > First I would take a hexeditor to check how the chars are really encoded.
> > Second, if the chars still in utf-8, and as I assume that all the content
> > is generated by DB, I would rename the file and generate a "new" one.
> >
> > I'm not quite sure, but I think that there might be a 2 byte tag at the
> > beginning of the file naming it as utf-encoded. In this case a iso char
> > would be messed if the compiler interprets this tag.
> >
> > But it's a bit of digging in the dark, as P. Gabriel states ...
> >
> > Regards,
> > Thomas
--
Dipl.-Ing. Thomas Zehbe