protected String strCut(String szText, int nLength)
 { // 문자열 자르기
  String r_val = szText;
  int oF = 0, oL = 0, rF = 0, rL = 0;
  int nLengthPrev = 0;
  try
  {
   byte[] bytes = r_val.getBytes("UTF-8"); // 바이트로 보관
   // x부터 y길이만큼 잘라낸다. 한글안깨지게.
   int j = 0;
   if (nLengthPrev > 0)
    while (j < bytes.length)
    {
     if ((bytes[j] & 0x80) != 0)
     {
      oF += 2;
      rF += 3;
      if (oF + 2 > nLengthPrev)
      {
       break;
      }
      j += 3;
     }
     else
     {
      if (oF + 1 > nLengthPrev)
      {
       break;
      }
      ++oF;
      ++rF;
      ++j;
     }
    }
   j = rF;
   while (j < bytes.length)
   {
    if ((bytes[j] & 0x80) != 0)
    {
     if (oL + 2 > nLength)
     {
      break;
     }
     oL += 2;
     rL += 3;
     j += 3;
    }
    else
    {
     if (oL + 1 > nLength)
     {
      break;
     }
     ++oL;
     ++rL;
     ++j;
    }
   }
   r_val = new String(bytes, rF, rL, "UTF-8"); // charset 옵션
  }
  catch (UnsupportedEncodingException e)
  {
   e.printStackTrace();
  }
  return r_val;
 }