Changeset b75671d for nick.c


Ignore:
Timestamp:
2015-06-17T22:47:26Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
b441614
Parents:
d832164 (diff), 2f99f23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into parson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nick.c

    rd832164 rb75671d  
    186186                   LC_CTYPE being set to something other than C/POSIX. */
    187187                if (!(irc && irc->status & IRC_UTF8_NICKS)) {
    188                         part = asc = g_convert_with_fallback(part, -1, "ASCII//TRANSLIT",
    189                                                              "UTF-8", "", NULL, NULL, NULL);
     188                        asc = g_convert_with_fallback(part, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, NULL, NULL);
     189
     190                        if (!asc) {
     191                                /* If above failed, try again without //TRANSLIT.
     192                                   //TRANSLIT is a GNU iconv special and is not POSIX.
     193                                   Other platforms may not support it. */
     194                                asc = g_convert_with_fallback(part, -1, "ASCII", "UTF-8", "", NULL, NULL, NULL);
     195                        }
     196
     197                        part = asc;
    190198                }
    191199
     
    368376
    369377        if (tab['A'] == 0) {
     378                /* initialize table so nonchars are mapped to themselves */
     379                for (i = 0; i < sizeof(tab); i++) {
     380                        tab[i] = i;
     381                }
     382                /* replace uppercase chars with lowercase chars */
    370383                for (i = 0; nick_lc_chars[i]; i++) {
    371384                        tab[(int) nick_uc_chars[i]] = nick_lc_chars[i];
    372                         tab[(int) nick_lc_chars[i]] = nick_lc_chars[i];
    373385                }
    374386        }
Note: See TracChangeset for help on using the changeset viewer.