[syslinux] COMBOOT API: Add calls for directory functions; Implement for FAT

H. Peter Anvin hpa at zytor.com
Mon Jan 12 11:59:28 PST 2009


Gene Cumm wrote:
> 
> I decided to delve more into the depths and confusion of codepages and
> UTF-16 (Windows Codepages, Windows OEM codepages, etc).  Unicode Chart
> "Latin-1", representing U+0080 through U+00FF has pretty much no
> corellation to my localized codepage (OEM-437 as that appears to be
> what is used in my BIOS).  Therefore, in the interest of providing
> accurate information in the displayed name, I will also skip out
> U+0080 and greater in favor of the short name as it should be more
> accurate (and hopefully 100% accurate).  UTF-16 below U+0080, by
> definition, should be consistent, regardless of the codepage the BIOS
> uses.  If I am mistaken in any of these assumptions, feedback is
> welcome.
> 

That's not really the best way to do it.  The right way is to search the 
codepage file for any Unicode we find; in particular, the primary 
Unicode column.  It might be a worthwhile idea to change the format of 
the codepage information so that all the primaries preceed all the 
secondaries; that would let us use a simple "repne scasw" to find the entry.

If nothing is found at all, then we flunk the longname and bounce back 
to the shortname.

Included is an untested patch which implements the format change; with 
this patch you should be able to use the ucs2_to_cp routine to convert a 
UCS-2 ("Unicode") character.

	-hpa
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ucs2
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090112/787bb7f5/attachment.ksh>


More information about the Syslinux mailing list