Author Topic: 'D' compiler is not fully supported! UTF-8 to the masses :)  (Read 20857 times)

Ptomaine

  • Guest
'D' compiler is not fully supported! UTF-8 to the masses :)
« on: August 31, 2006, 05:30:12 pm »
'D' source files are ALWAYS UTF-8. I couldn't find any way to convert my source code file into UTF-8 in Code::Blocks (only converted by external tools). Maybe it is the time to let programmers to choose the source file encodings? Moreover, when handling 'D' projects it is natural to set UTF-8 encoding for the source files by default.

One more thing, 'D' source files can be compiled in 3 ways by now. Only 2 of them supported by the Code::Blocks IDE ('DMD' and 'DGC aka 'D' for GCC'). The third one is when using 'BUILD' tool (the most useful approach). It needs to be included in Code::Blocks too (http://www.dsource.org/projects/build/).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #1 on: August 31, 2006, 06:15:51 pm »
'D' source files are ALWAYS UTF-8. I couldn't find any way to convert my source code file into UTF-8 in Code::Blocks (only converted by external tools). Maybe it is the time to let programmers to choose the source file encodings? Moreover, when handling 'D' projects it is natural to set UTF-8 encoding for the source files by default.

What's wrong with "Settings->Editor->Default encoding"?
Be patient!
This bug will be fixed soon...

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #2 on: August 31, 2006, 07:50:36 pm »
Build and Code::Blocks overlap too much, build + D is just like make + C++/C.  If you want to use build you have to invoke it just like you would make.

Ptomaine

  • Guest
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #3 on: September 07, 2006, 05:23:10 pm »
What's wrong with "Settings->Editor->Default encoding"?

What are you talking about? If you've ment "Settings->Editor->Default encoding when opening files" then you must know that it is NOT the way to improve the situation. I want to CREATE files in the neccessary encoding and even convert them if I need it.

Tell me, why I cannot convert files (source code or whatever) to any other encodings just within CB. I care this because the English language is not my native one and I make my comments and string constants in my native language. Why not to do just like Ultimate++ IDE allows you to do that? It's so natural tool and not so hard to implement? So why?????

Ptomaine

  • Guest
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #4 on: September 07, 2006, 05:27:12 pm »
Build and Code::Blocks overlap too much, build + D is just like make + C++/C.  If you want to use build you have to invoke it just like you would make.

Thanks for your explaination. But let me disagree with you. It is my responsibility to tune the build tool in a such a way that it works right for me. The only responsibility for CB is to call it and to pass the needed arguments to it. That's all.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #5 on: September 07, 2006, 05:45:37 pm »
Quote
Tell me, why I cannot convert files (source code or whatever) to any other encodings just within CB. I care this because the English language is not my native one and I make my comments and string constants in my native language. Why not to do just like Ultimate++ IDE allows you to do that?

Oh, no, another one...
Look Ptomaine, if you like [whatever_ide_goes_here] better, please, just use it.

Quote
It's so natural tool and not so hard to implement? So why?????

Because noone has sent a patch for it. It's that simple.
Be patient!
This bug will be fixed soon...

Offline aarti_pl

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #6 on: September 07, 2006, 07:11:06 pm »
I send a patch (not for above problem, but anyway...), and it is still not included :-(

DMD and GDC 'D' compilers works also on linux, but they are disabled in codeblocks on linux. My patch turn them on when using codeblocks on linux. My patch is still not included into codeblocks.

Please include it into main svn tree.

PS. Patch in attachment. I work with it already for quite a long time on linux. It's relatively simple, so I don't think it is necessary to test it on every platform.

Regards
Aarti_pl

[attachment deleted by admin]

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #7 on: September 07, 2006, 08:43:23 pm »
Quote from: Ptomaine link=topic=3950.msg31588#msg31588
Thanks for your explaination. But let me disagree with you. It is my responsibility to tune the build tool in a such a way that it works right for me. The only responsibility for CB is to call it and to pass the needed arguments to it. That's all.

You slightly misunderstood me.  I meant from inside codeblocks you invoke build with a custom make command, just like you do make.  It is not the responsibility of the CB developers to include build, just like they don't include make.  So using build is supported by Code::Blocks, you just have to get the program yourself.

Offtopic:  Have they renamed build to dbuild.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #8 on: September 08, 2006, 03:34:32 pm »
Something that I didn't understand was why DMD / GDC was new compilers ?
Shouldn't it (D) be more like a new language, next to the current C and C++ ?

Like this, for GCC:
  • C = gcc
  • CPP = g++
  • D = gdc

Or for Digital Mars:
  • C = dmc
  • CPP = dmc
  • D = dmd

Then the *.d files could be of type "D" and use the setting for the D compiler ?


Meanwhile, I'm using the "CPP" type for D files - with a custom build command:
Code
     <Option compilerVar="CPP" />
     <Option compiler="gcc" use="1" buildCommand="gdc $options $includes -c $file -o $object" />

It is being used to build the wxD project, on all three platforms: MSW/GTK/Mac

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #9 on: September 08, 2006, 03:37:02 pm »
Offtopic:  Have they renamed build to dbuild.

Not yet, it seems... http://dsource.org/projects/build/

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #10 on: September 08, 2006, 04:07:12 pm »
GDC is not a new compiler, it is a new frontend for GCC, much like GJC is java front end for GCC.  DMD is the reference/standard compiler created by Walter Bright (the language creator) and it basically sets the language feature set.  It uses the same optimizer and code generator that DMC uses.  In fact the frontend of DMD is the main part of the code for GDC.  D really needs to get its act together about shared libraries and such.  Last I checked (a few weeks ago) DMD couldn't create shared libraries on Linux, and separate compilation units have trouble with templates so GDC can't compile some of cooler template code.

EDIT: DMD can't create shared libraries on linux, had to update that.
« Last Edit: September 08, 2006, 05:47:22 pm by Game_Ender »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #11 on: September 08, 2006, 04:26:50 pm »
Right, what I meant was: why are they new compilers in Code::Blocks ?

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #12 on: September 08, 2006, 05:47:59 pm »
Wow, I was completely off base there that does make good sense.

Ptomaine

  • Guest
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #13 on: September 11, 2006, 01:13:07 am »
Oh, no, another one...
Look Ptomaine, if you like [whatever_ide_goes_here] better, please, just use it.

You right! I use it for tasks I think it works better for me. And this IS NOT the reason for you to be aggressive to US. Usually, good companies pay very close attension to their customer feedbacks. Why you try to argue to me while I'm trying to help imporoving CB? I do not understand.

Quote
It's so natural tool and not so hard to implement? So why?????

Because noone has sent a patch for it. It's that simple.

It's not that simple at all. Read the previous posts.
-------------------------------

Anyway, I do not want to argue here. I want to discuss the subject and to get an answer.

bigbug

  • Guest
Re: 'D' compiler is not fully supported! UTF-8 to the masses :)
« Reply #14 on: September 11, 2006, 03:05:58 pm »
Tell me, why I cannot convert files (source code or whatever) to any other encodings just within CB.
Is it, because you didn't try Edit->File encoding?