Ignore:
Timestamp:
2001-02-08T13:17:33+13:00 (23 years ago)
Author:
sjboddie
Message:

Fixed a bug in the C++ encoding support - 8 bit encodings like windows-1251
were being treated as 16 bit encodings in some places

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/gsdlunicode.h

    r1870 r1927  
    153153  };
    154154
     155  void set_multibyte (int new_multibyte) {multibyte = new_multibyte;};
     156
    155157  void reset ();
    156158  void convert (text_t &output, status_t &status);
     
    160162  unsigned char mapbuf[MAXMAPCHARLEN];
    161163  size_t mapbuflen;
     164  int multibyte;
    162165
    163166  // note: multiple instances of mapinconvert class are expensive
     
    172175    if (mapbuflen == 0) return 0;
    173176    if (mapbuf[0] < 0x80) return 1;
     177    if (!multibyte) return 1;
    174178    return 2;
    175179  }
     
    194198  };
    195199
     200  void set_multibyte (int new_multibyte) {multibyte = new_multibyte;};
     201
    196202  void reset ();
    197203  void convert (char *output, size_t maxlen,
     
    202208  size_t mapbuflen;
    203209  size_t mapbufhere;
     210  int multibyte;
    204211
    205212  mapconvert converter;
Note: See TracChangeset for help on using the changeset viewer.