Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 03, 2004 char/wchar/dchar phobos function calls | ||||
---|---|---|---|---|
| ||||
Attachments:
| after reading the Dspecs... i understood that Walter considered Unicode the future. the problem is that almost all functions from the standard library(std) do not support unicode. examples: char[] getDirName(char[] fullname) void rename(char[] from, char[] to) probably this question may sounds a little bit silly... Can anyone explain me how we should support internationalization? Is it illegal to have unicode dir paths? Is Unicode only used to communicate with a client, like error messages? best regards, Miguel Simões |
April 03, 2004 Re: char/wchar/dchar phobos function calls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Miguel Ferreira Simões Attachments:
| My first thought was to have 3 versions of each library function, one for each UTF type. It quickly became clear that Phobos would get too large and bulky with this. So, the plan evolved so that Phobos would revolve about UTF-8 (which *is* unicode, so the library functions do support unicode). Currently, not all of the Phobos library functions handle UTF-8 correctly, but many do (see std.file). "Miguel Ferreira Simões" <kobold@netcabo.pt> wrote in message news:c4mc2t$1upj$1@digitaldaemon.com... after reading the Dspecs... i understood that Walter considered Unicode the future. the problem is that almost all functions from the standard library(std) do not support unicode. examples: char[] getDirName(char[] fullname) void rename(char[] from, char[] to) probably this question may sounds a little bit silly... Can anyone explain me how we should support internationalization? Is it illegal to have unicode dir paths? Is Unicode only used to communicate with a client, like error messages? best regards, Miguel Simões |
April 04, 2004 Re: char/wchar/dchar phobos function calls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Attachments:
| Ok. But i did not understand a point: if i work with "char" and call any function of the Windows Api what version it will call? The Wide version (W) or the Ascii version (A)? So you are advicing me to use almost always "char"? "Walter" <walter@digitalmars.com> escreveu na mensagem news:c4n1bb$2v24$2@digitaldaemon.com... My first thought was to have 3 versions of each library function, one for each UTF type. It quickly became clear that Phobos would get too large and bulky with this. So, the plan evolved so that Phobos would revolve about UTF-8 (which *is* unicode, so the library functions do support unicode). Currently, not all of the Phobos library functions handle UTF-8 correctly, but many do (see std.file). |
April 04, 2004 Re: char/wchar/dchar phobos function calls | ||||
---|---|---|---|---|
| ||||
Posted in reply to Miguel Ferreira Simões Attachments:
| It's a bit tricky to make it work right, please look at std.file which I think works correctly and shows how to do it. "Miguel Ferreira Simões" <kobold@netcabo.pt> wrote in message news:c4pr07$vfb$1@digitaldaemon.com... Ok. But i did not understand a point: if i work with "char" and call any function of the Windows Api what version it will call? The Wide version (W) or the Ascii version (A)? So you are advicing me to use almost always "char"? "Walter" <walter@digitalmars.com> escreveu na mensagem news:c4n1bb$2v24$2@digitaldaemon.com... My first thought was to have 3 versions of each library function, one for each UTF type. It quickly became clear that Phobos would get too large and bulky with this. So, the plan evolved so that Phobos would revolve about UTF-8 (which *is* unicode, so the library functions do support unicode). Currently, not all of the Phobos library functions handle UTF-8 correctly, but many do (see std.file). |
Copyright © 1999-2021 by the D Language Foundation