From: "罗勇刚(Yonggang Luo) " <luoyonggang@gmail.com>
To: musl@lists.openwall.com
Subject: Re: There is no tests for musl,
Date: Fri, 8 May 2015 22:17:58 +0800 [thread overview]
Message-ID: <CAE2XoE8uCGvqM-54Ee1ekqCNgi6HapPDVVXByGonihY8qo2tww@mail.gmail.com> (raw)
In-Reply-To: <20150508141013.GX17573@brightrain.aerifal.cx>
2015-05-08 22:10 GMT+08:00 Rich Felker <dalias@libc.org>:
> On Fri, May 08, 2015 at 10:02:53PM +0800, 罗勇刚(Yonggang Luo) wrote:
>> Thanks for the detail explain, I know all the shortcut of 16bit
>> wchar_t, considerate that 4bit wchar_t is rarely used in unix world,
>> but 16bit wchar_t is frequently in
>> Windows/Qt/Java/Javascript, so I think it's better not change the
>> 16bit wchar_t to 32 bit, and that's would confusing those people
>> already use 16bit wchar_t on Windows platform, and this would affect
>> Unix- world, by default, on win32, wchar_t is 16 bit, this is a de
>> facto.
>
> That's a choice you can make in the system you're developing, but you
> should be aware that it makes it impossible to support full Unicode
> with the standard APIs and thus requires apps to either limit
> themselves to supporting only the BMP or using nonstandard APIs.
>
>> >From this point of view, getting wchar_t to be 32bit on win32 is
>> useless and cause more problems.
>> The main point to port musl on win32 is add posix support and utf8
>> support on win32.
>> The wchar_t is useless for those people need cross-platform text
>> processing, and should using char32_t instead. That's a design
>> principle.
>
> Again, char32_t can't support full Unicode if wchar_t is only 16-bit.
> It's stuck supporting just the BMP and the upper 16 bits are always
> zeros. Any attempt to make char32_t support the full range would
> produce inconsistent and nonconforming results. :(
I can predict the shortcoming of this, and there is a lot of ways to
resolve this, anyway,
for win32, preserve the original wchar_t semantics is the best
solution, I think there is no one would use
wchar_t for cross text processing, cause, on some system, wchar_t is
just 8bit width!
for some os platform:(
refere to http://en.wikipedia.org/wiki/Wide_character#Programming_specifics
We should not use wchar_t for cross-platform text processing.
Anyway, deal with ANSI things on win32 is the maddest things on the
world, cause wchar_t at lease is Unicode after all:)
either utf8,utf16 or utf32.
>
> Rich
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
next prev parent reply other threads:[~2015-05-08 14:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 7:38 罗勇刚(Yonggang Luo)
2015-05-08 8:01 ` Szabolcs Nagy
2015-05-08 8:03 ` 罗勇刚(Yonggang Luo)
2015-05-08 8:36 ` Szabolcs Nagy
2015-05-08 8:52 ` 罗勇刚(Yonggang Luo)
2015-05-08 12:49 ` Rich Felker
2015-05-08 13:10 ` 罗勇刚(Yonggang Luo)
2015-05-08 13:35 ` Rich Felker
2015-05-08 14:02 ` 罗勇刚(Yonggang Luo)
2015-05-08 14:10 ` Rich Felker
2015-05-08 14:17 ` 罗勇刚(Yonggang Luo) [this message]
2015-05-08 15:20 ` Szabolcs Nagy
2015-05-08 15:23 ` 罗勇刚(Yonggang Luo)
2015-05-08 15:36 ` Rich Felker
2015-05-08 15:41 ` 罗勇刚(Yonggang Luo)
2015-05-08 15:58 ` 罗勇刚(Yonggang Luo)
2015-05-08 20:01 writeonce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAE2XoE8uCGvqM-54Ee1ekqCNgi6HapPDVVXByGonihY8qo2tww@mail.gmail.com \
--to=luoyonggang@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).