add: else if(charset == QFont::KOI8R) { charsetStr = "koi8r"; enc = 0; }
context: const char* kfontToStr(const QFont& aFont){  const char *weightStr, *charsetStr;  int enc = 0;  int i;  QFont::Weight weight;  QFont::CharSet charset;    weight = (QFont::Weight)aFont.weight();  if (weight == QFont::Light) weightStr = "light";  else if (weight == QFont::DemiBold) weightStr = "demibold";  else if (weight == QFont::Bold) weightStr = "bold";  else if (weight == QFont::Black) weightStr = "black";  else weightStr = "normal";  const char* slantStr = aFont.italic() ? "i" : "r";  charset = aFont.charSet();  if (charset == QFont::AnyCharSet)  {    charsetStr = "*";    enc = 0;  }  else   {    charsetStr = "iso8859";    for (i=0; (int)encIso8859[i] >= 0; i++)      if (encIso8859[i] == charset) enc=i;  }  sprintf(fontStr, "%s-%s-%s-%d-%s-%d", aFont.family().ascii(), weightStr, slantStr,	  aFont.pointSize(), charsetStr, enc);  return fontStr;}