Encoding is totally broken.

From: Martin Sevior (msevior@tauon.ph.unimelb.EDU.AU)
Date: Thu Oct 24 2002 - 03:09:52 EDT

  • Next message: Ramón Flores: "Re: Selecting the right locale under window"

    Hi Folks,
            On my RedHat 8 laptop with current CVS I find that that UTF8
    encoding is totally borken.

    I put in a debug print in gr_UnixGRaphics:drawChars to find out what is
    happening.

    When I type 'fred' into an empty abiword I get...
    1711276032 1912602624 1694498816 1677721600

    from this code...
    void GR_UnixGraphics::drawChars(const UT_UCSChar* pChars, int iCharOffset,
                                    int iLength, UT_sint32 xoff, UT_sint32
    yoff,
                                    int * pCharWidths)
    {
      _UUD(xoff);
      _UUD(yoff);
    //
    // FIXME REMOVE THIS CODE!!!
    //
      UT_sint32 i =0;
      for(i=0; i< iLength;i++)
      {
              printf("%c",(char) (pChars[i +iCharOffset] & 127));
      }
      printf("\n");
      for(i=0; i< iLength;i++)
      {
              printf("%d ",pChars[i +iCharOffset]);
      }
      printf("\n");

    It looks like the little/endian big endian stuff is wrong. Maybe this
    happened from one of our PPC developers not noticing something.

    Just a guess.

    Anyway, could people into encoding please look at this?

    Thanks!

    Martin



    This archive was generated by hypermail 2.1.4 : Thu Oct 24 2002 - 03:17:35 EDT