Hi, On Sun, Sep 4, 2011 at 6:13 AM, Decheng Fan <fandech...@gmail.com> wrote: > On Sun, Sep 4, 2011 at 3:25 AM, Rugxulo <rugx...@gmail.com> wrote: >> >> Hi guys, >> Just curious, does anybody know of a C compiler that actually >> supports a *functional* locale.h ?? It doesn't seem like most (if any) >> barely support it, if at all. Kinda strange since it's a "requirement" >> for ANSI C (1989), esp. since the DOS support is presumably there >> (COUNTRY.SYS + NLSFUNC). It just seems weird to be missing pretty much >> everywhere. (I don't expect full C94 / NA1 's wchar_t, wcs*, etc., >> just wondering why it's not more widely supported in DOS.) > > Hi Rugxulo, > > It sounds interesting. Multi-lingual support provided by the OS platform was > really something that I have used on Windows and Linux, but I never used it > on MS-DOS or FreeDOS. I knew there are country.sys in MS-DOS and code page > support (even there is a Simplified Chinese version of MS-DOS 6.22), but I > don't know how to use them in programs. Is locale.h functional in Microsoft > compilers?
I don't have any MS compilers, that's why I ask. And I personally doubt it, esp. considering how lame even WinME codepage support was. (Thanks to people like Henrique and Eduardo, FreeDOS has very good codepage + country coverage.) C89 seemed to require 15 headers, and locale.h was one, but almost all DOS compilers I have don't include it (or even for the handful that did, a wimpy test didn't indicate it to actually work). Which sucks. I'm on a different computer right now, but I'm pretty sure only three compilers had locale.h (if I'm remembering correctly). There may be more, but I haven't got access to (nor ever used) them nowadays. CC386 apparently has some rough support for "en_EN", "en_GB", "fr_FR", and that's all I think (though I don't know how to activate it properly). I'm not sure what that entails. OpenWatcom has locale.h, but its headers are just confusing (thanks to supporting a billion OSes), so I have no idea if it's just empty stubs for DOS (probably) vs. works fine on Windows. (To most people, supporting cp850 was exotic enough, I guess.) They did used to have Japanese error messages for the compiler proper, but that's not the same as setlocale() and lconv->currency_symbol, etc. (Though their included vi clone was made 8-bit clean in latest release, I think, but I haven't tested.) DJGPP (GCC) you'd think would be the best. But I'm 99% sure they never bothered with multi-byte. At least, last I heard they only officially supported the default "C" locale. I know there were some third-party efforts. A quick check shows that Mark E. (Elbrecht?) did some incomplete wchar.h work (stubs only??) that was probably never patched in. Also "Jack" (Daisuke Aoyama) did some rough port of Bash 1.14.7 back in 1997 that supported Shift-JIS via two add-on libs. Also, CWS at one time wanted to support iconv.dxe, but I guess they never finished that (nor even 2.04 beyond "beta" status). There is a lloc*.zip file (only) in /current/v2tk/ or such, "liblocale" I think, and that (IIRC) basically patches some internal stuff to support COUNTRY.SYS, but I've never tested it very well. Long story short: I'm just curious. I would honestly be surprised if *nobody* supported it. Yeah, I have to admit, I don't need it. Heck, my alt-lang (E-o) doesn't even have a country (or support, obviously, heh) though it has a codepage. ;-) I hate to admit, but it's probably due to U.S. apathy since everything here is English only. Which sucks. But since we've discussed i18n on FreeDOS several times over the past few months, I figured I'd mention it (locale.h) in case anybody knew offhand. I know various FD tools support COUNTRY.SYS and codepages, but I was more curious if any DOS C compiler (since C is "everywhere") did, esp. re: ANSI C89, which mandated it. ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel