This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Preliminary fix for codecvt_members_unicode_wchar_t



Paolo Carlini wrote:

>However, the real issue with s390/powerpc is still not solved, since is
the
>VERIFY( r1 == codecvt_base::ok) to fail, *before* comparing i_arr and
i_lit.
>
>Ulrich, could you possibly dig deeper the wchar_t case?

Well, in this case the *input* to the conversion routine seems to
suffer from the same problem:

  ext_type        e_lit_base[24] =
  { 1644167168, 1811939328, 1627389952, 1660944384, 1795162112,  536870912,
    1879048192, 1694498816, 1627389952, 1912602624, 1811939328, 536870912,
    1778384896, 1627389952, 1929379840, 1828716544, 1761607680, 1845493760,
    1694498816, 536870912,  1946157056, 1694498816, 1627389952, 167772160
  };


If I replace this likewise with an explicit bytewise representation
of big-endian 4-byte integers, the test case succeeds.  Apparently
the conversion routines fails because UCS4 values with their most
significant byte non-zero are invalid (if my understanding of the
encoding is correct).

However, the test case specifies just "UCS4".  Does this always
imply big-endian?  Again I'm wondering why the test case succeeds
on other platforms ...


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]