Re: extended characterset output

2022-04-08 Thread Ali Çehreli via Digitalmars-d-learn
On 4/8/22 02:51, anonymous wrote: > Weird, I got this strange feeling that this problem stemmed from the > compiler I'm using (GDC) Some distribution install an old gdc. What version is yours? Ali

extended characterset output

2022-04-08 Thread anonymous via Digitalmars-d-learn
What's the proper way to output all characters in the extended character set? ```d void main() { foreach(char c; 0 .. 256) { write(isControl(c) ? '.' : c); } } ``` Expected output: ```

Re: Again, ask help with Dlang program footprint

2022-04-08 Thread dangbinghoo via Digitalmars-d-learn
On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote: On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote: [...] PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I added option `-link-defaultlib-shared=false` in dub.json by

Re: Again, ask help with Dlang program footprint

2022-04-08 Thread dangbinghoo via Digitalmars-d-learn
On Saturday, 9 April 2022 at 02:56:50 UTC, dangbinghoo wrote: On Saturday, 9 April 2022 at 02:19:52 UTC, dangbinghoo wrote: On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote: On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote: [...] PS: I need the program link Phobos

Re: extended characterset output

2022-04-08 Thread anonymous via Digitalmars-d-learn
On Friday, 8 April 2022 at 15:06:41 UTC, Ali Çehreli wrote: On 4/8/22 02:51, anonymous wrote: > Weird, I got this strange feeling that this problem stemmed from the > compiler I'm using (GDC) Some distribution install an old gdc. What version is yours? Ali Not sure actually. I just did "apt

Re: Again, ask help with Dlang program footprint

2022-04-08 Thread dangbinghoo via Digitalmars-d-learn
On Saturday, 9 April 2022 at 02:19:52 UTC, dangbinghoo wrote: On Friday, 8 April 2022 at 03:26:29 UTC, dangbinghoo wrote: On Friday, 8 April 2022 at 03:20:29 UTC, dangbinghoo wrote: [...] PS: I need the program link Phobos statically, don't want to use .so except the basic C library. so I

Re: extended characterset output

2022-04-08 Thread anonymous via Digitalmars-d-learn
On Friday, 8 April 2022 at 08:36:33 UTC, Ali Çehreli wrote: On 4/7/22 23:13, anonymous wrote: > What's the proper way to output all characters in the extended character > set? It is not easy to answer because there are a number of concepts here that may make it trivial or complicated. The

Re: Conversion from ANSI 1252 to unicode

2022-04-08 Thread Johann via Digitalmars-d-learn
Aaa... how could this escape my attention. Thanks a lot.

Re: extended characterset output

2022-04-08 Thread Ali Çehreli via Digitalmars-d-learn
On 4/7/22 23:13, anonymous wrote: > What's the proper way to output all characters in the extended character > set? It is not easy to answer because there are a number of concepts here that may make it trivial or complicated. The configuration of the output device matters. Is it set to

Re: How to implement this?

2022-04-08 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 8 April 2022 at 05:53:03 UTC, Elvis Zhou wrote: assumeNoEscapeOrWhatever!DynamicArray structs; structs ~= cast(A*) is it possible? That's what `@trusted` is for. And that's also why it should be used with care, and on the smallest code possible. ```d struct A {} struct B { A a;

Re: How to implement this?

2022-04-08 Thread Elvis Zhou via Digitalmars-d-learn
On Friday, 8 April 2022 at 09:08:07 UTC, Stanislav Blinov wrote: On Friday, 8 April 2022 at 05:53:03 UTC, Elvis Zhou wrote: assumeNoEscapeOrWhatever!DynamicArray structs; structs ~= cast(A*) is it possible? That's what `@trusted` is for. And that's also why it should be used with care, and

Re: extended characterset output

2022-04-08 Thread anonymous via Digitalmars-d-learn
On Friday, 8 April 2022 at 08:36:33 UTC, Ali Çehreli wrote: [snip] However, isControl() below won't work because isControl() only knows about the ASCII table. It would miss the unprintable characters above 127. [snip] This actuall works because I'm using std.uni.isControl() instead of