Index: lib/rtl/unicode.c =================================================================== --- lib/rtl/unicode.c (revision 41120) +++ lib/rtl/unicode.c (working copy) @@ -395,7 +395,38 @@ } } + /* + * @implemented + * + * NOTES + * Checks the oem-string to match the uincoded-string. + * Function who convert unicode string to oem string will set a questionmark + * when the character are unkown. So check it against the unicode string + * and return false when the uncode string not contain an questionmark. + */ +BOOLEAN +NTAPI +RtlpDidUnicodeToOemWork(PUNICODE_STRING UnicodeString,POEM_STRING OemString) +{ + ULONG i; + if ((OemString != NULL) && (OemString->Buffer != NULL)) + { + i = 0; + while (OemString->Buffer[i]!=0) + { + if ((OemString->Buffer[i]=='?') && (UnicodeString->Buffer[i]!=L'?')) + { + return FALSE; + } + i++; + } + return TRUE; + } + return FALSE; +} + +/* * @unimplemented */ BOOLEAN @@ -1534,8 +1565,14 @@ UniSource->Buffer, UniSource->Length); - /* FIXME: Check if everything mapped correctly and - * return STATUS_UNMAPPABLE_CHARACTER */ + if (NT_SUCCESS(Status)) + { + /* check for unmapped character */ + if (RtlpDidUnicodeToOemWork(UniSource,OemDest) == FALSE) + { + Status = STATUS_UNMAPPABLE_CHARACTER; + } + } if (!NT_SUCCESS(Status) && AllocateDestinationString) {