private static String decodeRawWord(String rawWord) {
    if (rawWord == null || "".equals(rawWord)) {
      return rawWord;
    }

    char[] cs = rawWord.toCharArray();

    boolean quoted = cs[0] == CHAR_QUOTE && cs[cs.length - 1] == CHAR_QUOTE;
    if (!quoted) {
      return rawWord;
    }

    boolean quoteOn = false;
    StringBuilder sb = new StringBuilder();
    for (int i = 1; i < cs.length - 1; i++) {
      char c = cs[i];
      if (c == CHAR_QUOTE) {
        if (quoteOn) {
          sb.append(c);
        }
        quoteOn = !quoteOn;
      } else {
        sb.append(c);
      }
    }
    return sb.toString();
  }