/* Translate all VT-UTF8 characters in the Raw FIFI into unicode characters, and insert them into Unicode FIFO. */
VOID VTUTF8RawDataToUnicode(IN TERMINAL_DEV *TerminalDevice)
/* Translate all VT-UTF8 characters in the Raw FIFI into unicode characters, and insert them into Unicode FIFO. */
VOID VTUTF8RawDataToUnicode(IN TERMINAL_DEV *TerminalDevice)
{
  UTF8_CHAR  Utf8Char;
  UINT8      ValidBytes;
  UINT16     UnicodeChar;
  ValidBytes = 0;
  while (!IsRawFiFoEmpty (TerminalDevice) && !IsUnicodeFiFoFull (TerminalDevice)) {
    GetOneValidUtf8Char (TerminalDevice, &Utf8Char, &ValidBytes);
    if ((ValidBytes < 1) || (ValidBytes > 3)) {
      continue;
    }
    Utf8ToUnicode (Utf8Char, ValidBytes, (CHAR16 *)&UnicodeChar);
    UnicodeFiFoInsertOneKey (TerminalDevice, UnicodeChar);
  }
}