flat assembler
Message board for the users of flat assembler.

Index > Windows > about character translation

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 22 Dec 2010, 11:30
When i input data via keyboard, os must translate key signal into proper character.

How is it done? From my understanding, foolowing this:

- keyboard interrupts cpu
- cpu read usb/ps2 register wich is mapped to real keyboard hardware
- cpu has now scan code
- scan code is translated by OS into virtual key code depending on driver (keyboard layout)
- virtual key code is a universal name of a key
- now os take state of keyboard, and translate virtual key code into code pint using code page, or holds if its a dead char waiting for another V-code
- how does windows manage code points? how they are stored in code page? is it utf-16, or something else?
- now translated character is sent to something

WM_CHAR will always contain utf16 character, is it true on windows 9x and nt?

when storing file anme in ntfs, what encoding is used? I guess its utf16, am i right? What about FAT in windows 9x/NT? Is it also utf16, or something else with specyfied code page?


Where do i find such knowleadge about my questions, i belive its inefficient to ask everytime when i dont understand something.
Post 22 Dec 2010, 11:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20485
Location: In your JS exploiting you and your system
revolution 22 Dec 2010, 12:01
NTFS internally uses UNICODE (not UTF-16) for filenames.

FAT uses ASCII (or byte, or CHAR, or something like that anyway).

WM_CHAR return a TCHAR (size depends upon A or W call made to the API)

NT/2K/XP/++ uses UNICODE for all internal functions and is said to be more efficient when running UNICODE apps.

95/98/ME uses ASCII for all internal functions.
Post 22 Dec 2010, 12:01
View user's profile Send private message Visit poster's website Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 22 Dec 2010, 16:35
and code points in code pages?
when i translate character from 1 page to another, it must go through a code point list. Whats used there?
Post 22 Dec 2010, 16:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.