Best way to convert between GBK/GB18030 to utf8 ?

2023-05-22 Thread John Xu via Digitalmars-d-learn
What is the best way to convert a GBK/GB18030 file contents, i.e. read via: std.stdio.read(gbkFile).to!string , to utf8 encoding ?

Re: Best way to use C library

2023-05-22 Thread Theo via Digitalmars-d-learn
On Friday, 19 May 2023 at 18:31:45 UTC, Maximilian Naderer wrote: .. I’m hope somebody could give me some insights. Thank you ! Kind regards from Austria Max DConf Online '22 - Translating C to D (Dennis Korpel) https://www.youtube.com/watch?v=654rSPaIA0o

Re: Best way to use C library

2023-05-22 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 19 May 2023 at 18:31:45 UTC, Maximilian Naderer wrote: Hello guys, So what’s currently the best way to use a big C library? Let’s assume something like cglm assimp glfw - Some big libraries are translated, for example https://code.dlang.org/packages/glfw-d was created with both

Re: Can dmd compile a favicon.ico to exe file ?

2023-05-22 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 22/05/2023 11:18 PM, John Xu wrote: When I put resource.rc in sourceFiles, dub said, "Error: unrecognized file extension rc"; When I put resource.res in sourceFiles, dub said,"resource.res : fatal error LNK1136: Invalid or damaged file. Error: linker exited with status 1136" Yes, .res is t

Re: Can dmd compile a favicon.ico to exe file ?

2023-05-22 Thread John Xu via Digitalmars-d-learn
On Friday, 19 May 2023 at 21:19:07 UTC, Richard (Rikki) Andrew Cattermole wrote: On 19/05/2023 9:39 PM, John Xu wrote: On Thursday, 18 May 2023 at 15:39:05 UTC, Richard (Rikki) Andrew Cattermole wrote: On 19/05/2023 2:19 AM, John Xu wrote: On Monday, 15 May 2023 at 03:54:03 UTC, Richard (Rikk

Re: Log rotation in std.logger.filelogger

2023-05-22 Thread Kagamin via Digitalmars-d-learn
I suppose you write a custom logger for that or take an already written one from code.dlang.org