Print this page
3154 Nonconforming tolower and toupper with UTF-8 locales

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/localedef/wide.c
          +++ new/usr/src/cmd/localedef/wide.c
↓ open down ↓ 153 lines elided ↑ open up ↑
 154  154          (void) vasprintf(&msg, fmt, va);
 155  155          va_end(va);
 156  156  
 157  157          free(widemsg);
 158  158          widemsg = msg;
 159  159  }
 160  160  
 161  161  /*
 162  162   * This is used for 8-bit encodings.
 163  163   */
      164 +/* ARGSUSED */
 164  165  int
 165  166  towide_none(wchar_t *c, const char *mb, unsigned n)
 166  167  {
 167  168          _NOTE(ARGUNUSED(n));
 168  169  
 169  170          if (mb_cur_max != 1) {
 170  171                  werr("invalid or unsupported multibyte locale");
 171  172                  return (-1);
 172  173          }
 173  174          *c = (uint8_t)*mb;
↓ open down ↓ 475 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX