RE: RTF language codes

From: Carl W. Brown (cbrown@xnetinc.com)
Date: Tue Jul 24 2001 - 11:41:46 EDT


Marc,

I see to many people define LCIDs in hex. It is a very bad practice. Use
winnt.h to produce the codes. You are not only prone to fewer errors but
when things change you will get compile errors.

For example:

  LANGSUBLANGINT(LANG_RUSSIAN,SUBLANG_DEFAULT), "ru_RU" ,
  LANGSUBLANGINT(LANG_SERBIAN,SUBLANG_SERBIAN_LATIN), "sh_YU" ,
  LANGSUBLANGINT(LANG_SERBIAN,SUBLANG_SERBIAN_CYRILLIC), "sr_YU" ,
  LANGSUBLANGINT(LANG_SERBIAN,SUBLANG_DEFAULT), "sr_YU" ,
  LANGSUBLANGINT(LANG_CROATIAN,SUBLANG_DEFAULT), "hr_YU" ,

You will also notice that even though "sh" is no longer a valid ISO language
code that it is still used by some systems. Java for example uses "iw_IL"
not "he_IL" so when they fix that, how many programs will be broken?

If you have a cross platform system you should use RFC 1766 style locales
between systems and convert them to LCIDs on Windows.

Carl

> -----Original Message-----
> From: unicode-bounce@unicode.org [mailto:unicode-bounce@unicode.org]On
> Behalf Of Marc Durdin
> Sent: Monday, July 23, 2001 9:23 PM
> To: Michael (michka) Kaplan; unicode@unicode.org
> Subject: Re: RTF language codes
>
>
> At 08:17 PM 23/07/2001 -0700, Michael \(michka\) Kaplan wrote:
> >From: "Marc Durdin" <mcdurdin@tavultesoft.com>
> >
> >> I must disagree with this statement. I know of quite a few
> changes to the
> >LCID list, some of which have caused me considerable pain in the past.
> >
> >Any of them in winnt.h?
>
> Try Serbo-Croatian. Documents created with the old Cyrillic LCID
> definitely would not spell-check correctly -- and may not even
> display correctly, if the data was encoded using a default code
> page for that LCID. Sorry, I don't have any files created with
> this LCID now.
>
> What if I wanted to use Rhaeto-Romanic; all the older
> specifications (RTF, Windows SDK) said I could, but I can't
> create a program that will use LANG_RHAETOROMANIC -- it's not
> there. So is it official or isn't it?
>
> Half of the LCIDs documented on Microsoft's web site don't make
> it into winnt.h. So, does this mean that knowledge base articles
> should be ignored? Or that winnt.h (prerelease/winnt.h to be
> pedantic) is out of date? What LCID should I use for Welsh or
> Lao or Khmer or Gaelic -- should I use the LCIDs that MS list for
> Word 2000 -- or are they not official? If I create a Word 2000
> document using one of those LCIDs, will I ever be able to load it
> in another program? Will these LCIDs ever make it into winnt.h?
>
> winnt.h is not a specification of a standard: it's a C header
> file. winnt.h does not correspond with other information on
> Microsoft's web site. To my way of thinking, this inconsistency
> is a real problem.
>
> Cheers,
>
> Marc Durdin
> Tavultesoft
>
>
>



This archive was generated by hypermail 2.1.2 : Tue Jul 24 2001 - 12:47:51 EDT