pike.git / lib / modules / Standards.pmod / IIM.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/IIM.pmod:300:    }    } else if (marker == "\xff\xd8") {    do {    string app = fd->read(2);    if (sizeof(app) != 2)    break;    string length_s = fd->read(2);    int length;    if (sizeof(length_s) == 2)    length = short_value(length_s); +  else +  break;    //werror ("length: %O\n", short_value(length_s));    -  string data = fd->read(length-2); +  string data = fd->read((length-2) & 0xffff);    if (app == "\xff\xed") // APP14 Photoshop    {    //werror("data: %O\n", data);    photoshop_data = data;    break;    }    } while (1);    } else {    //werror("unknown marker: %O neither JPEG nor Postscript\n", marker);    return ([]);
pike.git/lib/modules/Standards.pmod/IIM.pmod:370:    string charset;    if (!res->charset) {    charset = "macintosh";    } else {    charset = lower_case(res->charset[0]);       // Remap to standard names:    charset = ([    "cp_1252":"windows1252",    "cp_2":"macintosh", +  "cp_utf8": "utf8",    ])[charset] || charset;    }    //werror("Charset: %O\n", charset);    res->charset = ({ charset });    object decoder = Locale.Charset.decoder(charset);    foreach(res; string key; array(string) vals) {    res[key] = map(vals,    lambda(string val, object decoder) {    return decoder->feed(val)->drain();    }, decoder);    }    }       return res;   }