Semantics of toString

HOSOKAWA Kenchi hskwk at inter7.jp
Thu Nov 12 15:39:16 PST 2009


Bill Baxter Wrote:

> On Thu, Nov 12, 2009 at 10:46 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
> >>>
> >>> I'd agree with the delegate idea if we established that UTF-8 is favored
> >>> compared to all other formats.
> >>
> >> D seems to favor UTF8 -- it is the default type for string literals. &#63728;I
> >> don't think I've ever used dchar, and I usually only use wchar to talk to
> >> Win32 functions when required.
> >>
> >> The question I'd ask is -- how common is it where the versions other than
> >> char[] would be more convenient?
> >
> > I don't know. I think Asian-language users might give a salient answer.
> 
> This isn't authoritative, but I don't think utf-16 is commonly used in
> Japan (except for calling Windows APIs).
> 
> If you look at Mozilla the default Japanese encoding listed is
> Shift-JIS.  A lot of Japanese email still gets sent as ISO-2022-JP.
> Otherwise utf-8 I think.   A quick look at www.asahi.com shows they're
> using EUC-JP.  nicovideo.jp is using utf-8.  I seem to recall that my
> Japanese Visual Studio even saved files in Utf-8, or at least could be
> set to use utf-8.   In short, I think utf-8 is closer to being a
> widely accepted standard for documents over there than utf-16 is.
> 
> --bb

That is true. UTF8 works well.
Now few person believe dream of fixed length UTF16. Surrogate Pairs must die.

We, maybe not only Japanese but all Asian users, also need converters between UTFs and traditional local encoding.
Implementations are up to local users.



More information about the Digitalmars-d mailing list