#include <rtl.h>
#include <debug.h>
Go to the source code of this file.
|
NTSTATUS NTAPI | RtlCustomCPToUnicodeN (IN PCPTABLEINFO CustomCP, OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize OPTIONAL, IN PCHAR CustomString, IN ULONG CustomSize) |
|
WCHAR NTAPI | RtlpDowncaseUnicodeChar (IN WCHAR Source) |
|
WCHAR NTAPI | RtlDowncaseUnicodeChar (IN WCHAR Source) |
|
VOID NTAPI | RtlGetDefaultCodePage (OUT PUSHORT AnsiCodePage, OUT PUSHORT OemCodePage) |
|
VOID NTAPI | RtlInitCodePageTable (IN PUSHORT TableBase, OUT PCPTABLEINFO CodePageTable) |
|
VOID NTAPI | RtlInitNlsTables (IN PUSHORT AnsiTableBase, IN PUSHORT OemTableBase, IN PUSHORT CaseTableBase, OUT PNLSTABLEINFO NlsTable) |
|
NTSTATUS NTAPI | RtlMultiByteToUnicodeN (OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize, IN PCSTR MbString, IN ULONG MbSize) |
|
NTSTATUS NTAPI | RtlConsoleMultiByteToUnicodeN (OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize, IN PCSTR MbString, IN ULONG MbSize, OUT PULONG Unknown) |
|
NTSTATUS NTAPI | RtlMultiByteToUnicodeSize (OUT PULONG UnicodeSize, IN PCSTR MbString, IN ULONG MbSize) |
|
NTSTATUS NTAPI | RtlOemToUnicodeN (OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize OPTIONAL, IN PCCH OemString, IN ULONG OemSize) |
|
VOID NTAPI | RtlResetRtlTranslations (IN PNLSTABLEINFO NlsTable) |
|
NTSTATUS NTAPI | RtlUnicodeToCustomCPN (IN PCPTABLEINFO CustomCP, OUT PCHAR CustomString, IN ULONG CustomSize, OUT PULONG ResultSize OPTIONAL, IN PWCHAR UnicodeString, IN ULONG UnicodeSize) |
|
NTSTATUS NTAPI | RtlUnicodeToMultiByteN (OUT PCHAR MbString, IN ULONG MbSize, OUT PULONG ResultSize OPTIONAL, IN PCWCH UnicodeString, IN ULONG UnicodeSize) |
|
NTSTATUS NTAPI | RtlUnicodeToMultiByteSize (OUT PULONG MbSize, IN PCWCH UnicodeString, IN ULONG UnicodeSize) |
|
NTSTATUS NTAPI | RtlUnicodeToOemN (OUT PCHAR OemString, IN ULONG OemSize, OUT PULONG ResultSize OPTIONAL, IN PCWCH UnicodeString, IN ULONG UnicodeSize) |
|
WCHAR NTAPI | RtlpUpcaseUnicodeChar (IN WCHAR Source) |
|
WCHAR NTAPI | RtlUpcaseUnicodeChar (IN WCHAR Source) |
|
NTSTATUS NTAPI | RtlUpcaseUnicodeToCustomCPN (IN PCPTABLEINFO CustomCP, OUT PCHAR CustomString, IN ULONG CustomSize, OUT PULONG ResultSize OPTIONAL, IN PWCHAR UnicodeString, IN ULONG UnicodeSize) |
|
NTSTATUS NTAPI | RtlUpcaseUnicodeToMultiByteN (OUT PCHAR MbString, IN ULONG MbSize, OUT PULONG ResultSize OPTIONAL, IN PCWCH UnicodeString, IN ULONG UnicodeSize) |
|
NTSTATUS NTAPI | RtlUpcaseUnicodeToOemN (OUT PCHAR OemString, IN ULONG OemSize, OUT PULONG ResultSize OPTIONAL, IN PCWCH UnicodeString, IN ULONG UnicodeSize) |
|
CHAR NTAPI | RtlUpperChar (IN CHAR Source) |
|
◆ NDEBUG
Definition at line 13 of file nls.c.
◆ RtlConsoleMultiByteToUnicodeN()
Definition at line 301 of file nls.c.
307{
309
311 DPRINT1(
"RtlConsoleMultiByteToUnicodeN calling RtlMultiByteToUnicodeN\n");
314 UnicodeSize,
315 ResultSize,
316 MbString,
317 MbSize);
318}
NTSTATUS NTAPI RtlMultiByteToUnicodeN(OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize, IN PCSTR MbString, IN ULONG MbSize)
◆ RtlCustomCPToUnicodeN()
Definition at line 45 of file nls.c.
51{
54
56
57 if (!CustomCP->DBCSCodePage)
58 {
59
60 if (CustomSize > (UnicodeSize /
sizeof(
WCHAR)))
62 else
64
65 if (ResultSize)
67
69 {
72 CustomString++;
73 }
74 }
75 else
76 {
77
78
80 }
81
83}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
◆ RtlDowncaseUnicodeChar()
Definition at line 131 of file nls.c.
132{
134
136}
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
WCHAR NTAPI RtlpDowncaseUnicodeChar(IN WCHAR Source)
◆ RtlGetDefaultCodePage()
Definition at line 142 of file nls.c.
144{
146
149}
static CODEPAGE_ENTRY AnsiCodePage
static CODEPAGE_ENTRY OemCodePage
◆ RtlInitCodePageTable()
Definition at line 155 of file nls.c.
157{
159
161
162 DPRINT(
"RtlInitCodePageTable() called\n");
163
165
166
173
177
178
181
182
184
185
188 else
190
191
193 {
196 }
197 else
198 {
201 }
202}
#define MAXIMUM_LEADBYTES
struct _NLS_FILE_HEADER * PNLS_FILE_HEADER
_Out_ PCPTABLEINFO CodePageTable
UCHAR LeadByte[MAXIMUM_LEADBYTES]
USHORT MaximumCharacterSize
USHORT TransUniDefaultChar
#define RtlCopyMemory(Destination, Source, Length)
Referenced by IntGetCodePageEntry(), NlsInit(), and RtlInitNlsTables().
◆ RtlInitNlsTables()
Definition at line 208 of file nls.c.
212{
214
215 DPRINT(
"RtlInitNlsTables()called\n");
216
217 if (AnsiTableBase && OemTableBase && CaseTableBase)
218 {
221
222 NlsTable->UpperCaseTable = (
PUSHORT)CaseTableBase + 2;
223 NlsTable->LowerCaseTable = (
PUSHORT)CaseTableBase + *((
PUSHORT)CaseTableBase + 1) + 2;
224 }
225}
VOID NTAPI RtlInitCodePageTable(IN PUSHORT TableBase, OUT PCPTABLEINFO CodePageTable)
◆ RtlMultiByteToUnicodeN()
Definition at line 231 of file nls.c.
236{
239
241
243 {
244
245 if (MbSize > (UnicodeSize /
sizeof(
WCHAR)))
247 else
249
250 if (ResultSize)
252
254 {
256 }
257 }
258 else
259 {
260
261
262
265 PCSTR MbEnd = MbString + MbSize;
266
267 for (
i = 0;
i < UnicodeSize /
sizeof(
WCHAR) && MbString < MbEnd;
i++)
268 {
269 Char = *(
PUCHAR)MbString++;
270
271 if (Char < 0x80)
272 {
274 continue;
275 }
276
278
279 if (!LeadByteInfo)
280 {
282 continue;
283 }
284
285 if (MbString < MbEnd)
287 }
288
289 if (ResultSize)
290 *ResultSize =
i *
sizeof(
WCHAR);
291 }
292
294}
PUSHORT NlsAnsiToUnicodeTable
Referenced by RtlConsoleMultiByteToUnicodeN().
◆ RtlMultiByteToUnicodeSize()
Definition at line 325 of file nls.c.
328{
330
332
334 {
335
336 *UnicodeSize = MbSize *
sizeof(
WCHAR);
337 }
338 else
339 {
340
341
342
343 while (MbSize--)
344 {
346
348 {
349 if (MbSize)
350 {
351
352 MbSize--;
353 MbString++;
354 }
355 }
356
357
359 }
360
361
363 }
364
365
367}
_In_ ULONG _In_ ULONG _In_ ULONG Length
◆ RtlOemToUnicodeN()
Definition at line 373 of file nls.c.
378{
381
383
385 {
386
387 if (OemSize > (UnicodeSize /
sizeof(
WCHAR)))
389 else
391
392 if (ResultSize)
394
396 {
400 }
401 }
402 else
403 {
404
405
406
410
412 {
414
415 if (Char < 0x80)
416 {
418 continue;
419 }
420
422
423 if (!OemLeadByteInfo)
424 {
426 continue;
427 }
428
432 }
433
434 if (ResultSize)
435 *ResultSize =
i *
sizeof(
WCHAR);
436 }
437
439}
PUSHORT NlsOemLeadByteInfo
BOOLEAN NlsMbOemCodePageTag
PUSHORT NlsOemToUnicodeTable
*BytesInOemString PCHAR OemString
◆ RtlpDowncaseUnicodeChar()
Definition at line 89 of file nls.c.
90{
92
94
97
100
103
106
109
112
115
118
121
123
125}
_In_ ULONG _In_ ULONG Offset
PUSHORT NlsUnicodeLowercaseTable
Referenced by RtlDowncaseUnicodeChar().
◆ RtlpUpcaseUnicodeChar()
◆ RtlResetRtlTranslations()
Definition at line 445 of file nls.c.
446{
448
449 DPRINT(
"RtlResetRtlTranslations() called\n");
450
451
459
460
468
469
472
473
476}
PUSHORT NlsUnicodeToMbOemTable
PCHAR NlsUnicodeToAnsiTable
USHORT NlsUnicodeDefaultChar
PUSHORT NlsUnicodeToMbAnsiTable
PCHAR NlsUnicodeToOemTable
◆ RtlUnicodeToCustomCPN()
Definition at line 482 of file nls.c.
488{
491
493
494 if (!CustomCP->DBCSCodePage)
495 {
496
497 if (UnicodeSize > (CustomSize *
sizeof(
WCHAR)))
499 else
501
502 if (ResultSize)
504
506 {
508 CustomString++;
510 }
511 }
512 else
513 {
514
515
517 }
518
520}
◆ RtlUnicodeToMultiByteN()
Definition at line 526 of file nls.c.
531{
534
536
538 {
539
540 Size = (UnicodeSize > (MbSize *
sizeof(
WCHAR)))
541 ? MbSize : (UnicodeSize /
sizeof(
WCHAR));
542
543 if (ResultSize)
545
547 {
549 }
550 }
551 else
552 {
553
554
555
558
560 {
562
563 if (WideChar < 0x80)
564 {
565 *MbString++ =
LOBYTE(WideChar);
566 continue;
567 }
568
570
572 {
573 *MbString++ =
LOBYTE(MbChar);
574 continue;
575 }
576
578 {
579 *MbString++ =
HIBYTE(MbChar);
580 *MbString++ =
LOBYTE(MbChar);
582 }
583 else break;
584 }
585
586 if (ResultSize)
587 *ResultSize = MbSize -
i;
588 }
589
591}
◆ RtlUnicodeToMultiByteSize()
Definition at line 598 of file nls.c.
601{
602 ULONG UnicodeLength = UnicodeSize /
sizeof(
WCHAR);
604
606
608 {
609
610 *MbSize = UnicodeLength;
611 }
612 else
613 {
614
615
616
617 while (UnicodeLength--)
618 {
620
622 {
623 MbLength +=
sizeof(
WCHAR);
624 }
625 else
626 {
627 MbLength++;
628 }
629 }
630
631 *MbSize = MbLength;
632 }
633
634
636}
◆ RtlUnicodeToOemN()
Definition at line 643 of file nls.c.
648{
650
652
653
654 UnicodeSize /=
sizeof(
WCHAR);
655
657 {
658 while (OemSize && UnicodeSize)
659 {
662 OemSize--;
663 UnicodeSize--;
664 }
665 }
666 else
667 {
668 while (OemSize && UnicodeSize)
669 {
671
673 {
674 if (OemSize < 2)
675 break;
677 OemSize--;
678 }
680 OemSize--;
681 UnicodeSize--;
682 }
683 }
684
685 if (ResultSize)
687
689}
#define STATUS_BUFFER_OVERFLOW
◆ RtlUpcaseUnicodeChar()
Definition at line 721 of file nls.c.
722{
724
726}
WCHAR NTAPI RtlpUpcaseUnicodeChar(IN WCHAR Source)
◆ RtlUpcaseUnicodeToCustomCPN()
Definition at line 732 of file nls.c.
738{
742
744
745 if (!CustomCP->DBCSCodePage)
746 {
747
748 if (UnicodeSize > (CustomSize *
sizeof(
WCHAR)))
750 else
752
753 if (ResultSize)
755
757 {
759 *CustomString = ((
PCHAR)CustomCP->WideCharTable)[UpcaseChar];
760 ++CustomString;
762 }
763 }
764 else
765 {
766
767
769 }
770
772}
◆ RtlUpcaseUnicodeToMultiByteN()
Definition at line 778 of file nls.c.
783{
787
789
791 {
792
793 if (UnicodeSize > (MbSize *
sizeof(
WCHAR)))
795 else
797
798 if (ResultSize)
800
802 {
805 MbString++;
807 }
808 }
809 else
810 {
811
812
814 }
815
817}
◆ RtlUpcaseUnicodeToOemN()
Definition at line 823 of file nls.c.
828{
832
834
836 {
837
838 if (UnicodeSize > (OemSize *
sizeof(
WCHAR)))
840 else
842
843 if (ResultSize)
845
847 {
852 }
853 }
854 else
855 {
856
857
858
861
863 {
865
866 if (WideChar < 0x80)
867 {
869 continue;
870 }
871
873
875 {
877 continue;
878 }
879
881 {
885 }
886 else break;
887 }
888
889 if (ResultSize)
890 *ResultSize = OemSize -
i;
891 }
892
894}
◆ RtlUpperChar()
Definition at line 900 of file nls.c.
901{
904
906
907
909 {
910
912 {
913
914 return Source ^ (
'a' -
'A');
915 }
916 else
917 {
918
920 }
921 }
922 else
923 {
925 {
926
927
928
930
931
933
934
936 }
937 else
938 {
939
940
942 }
943 }
944
946}
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
◆ NlsAnsiCodePage
◆ NlsAnsiToUnicodeTable
◆ NlsLeadByteInfo
◆ NlsMbCodePageTag
◆ NlsMbOemCodePageTag
◆ NlsOemCodePage
◆ NlsOemDefaultChar
USHORT NlsOemDefaultChar = '\0' |
◆ NlsOemLeadByteInfo
◆ NlsOemToUnicodeTable
◆ NlsUnicodeDefaultChar
USHORT NlsUnicodeDefaultChar = 0 |
◆ NlsUnicodeLowercaseTable
◆ NlsUnicodeToAnsiTable
◆ NlsUnicodeToMbAnsiTable
◆ NlsUnicodeToMbOemTable
◆ NlsUnicodeToOemTable
◆ NlsUnicodeUpcaseTable