[ros-kernel] Nls/code pages

Gunnar Dalsnes hardon at online.no
Tue May 25 19:52:39 CEST 2004


> 
> > I noticed in .nls files in kernel32\nls some lines are commented out
> because
> > windres complain. What is the problem? Is this a windres 
> bug or is this
> > because Wine invented something incompatible? Their wrc 
> work fine with
> these
> > nls files. Can we use wrc too?
> 
> I don't know why the lines were commented out. Remove the 
> comments and try
> to rebuild kernel32.dll.

I tried but windres complain about L prefixed strings. That's probably why
they are commented out.
 
> 
> Is there any significant difference between keeping the 
> locale information
> in kernel32.dll and maping a locale information file 
> (locale.nls) into a
> named section?

Having it mapped will make it easier to add new locales (just update
locale.nls), but that's not a problem for us i think, since were open
source. Having it mapped has no backsides either, except for more work
implementing it... It's different with code pages since the kernel needs
them, but afaik the kernel doesn't care about locales.

> 
> 
> > And where does codepages come from? Are the c_xxxx.nls 
> files mapped into
> > umode somehow? It seems like they are only mapped into kmode...
> 
> That's right the codepage files (c_xxxx.nls) are not mapped 
> into usermode
> memory yet.

Just throwing out some thought:

Have you thought about how to do it, if every codepage file should be mapped
individually or if they should be copied into a memory section and how/where
in umode we should store info about where the memory/image section(s) reside
in memory etc? And by whom and where (ntoskrnl/win32k) should they be
mapped? 

When using the control panel in windows you can select additional codepages
and i think they instantly become active (mappen into new (and existing?)
processes) without reboot. If the kernel does the mapping, some hidden api
may exist. I examined the intl.cpl but no imports seemed related except the
registry imports. Could be that the kernel has a registry change notify
callback that loads new codepages...

> Btw, I noticed that csrss.exe keep open handles to _all_ used 
> nls files!?

In Windows you mean?

> 
> 

-Gunnar





More information about the Ros-kernel mailing list