Re: National characters under Borland C++ 5.02 Windows/DOS

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ricardo Forno wrote:
> Thanks, Igor, but the problem is how to use the standard facilities of
> Borland C++ 5.02 without too much fuss. Please see my answer to Martin
> Stachon.

I can't see any answer to my message...Topica?!

I have never seen your Borland IDE, but maybe you can set up codepage for
editing?
Or perhaps you can write a simple tool to run your code thru and change code
page.
(Maybe you could also tell the IDE to do it automatically during build process)
btw you can use windows API function for this:

/* Win->Dos */
BOOL CharToOem(

    LPCTSTR lpszSrc, // pointer to string to translate  
    LPSTR lpszDst  // pointer to translated string 
   );


/* Dos->Win
BOOL OemToChar(

    LPCSTR lpszSrc, // pointer to string to translate 
    LPTSTR lpszDst  // pointer to buffer for translated string  
   );

or you can just use your own table for conversion.

Or perhaps you can write a macro in C to let the preprocessor do this
for you? I am not a skilled C programmer, but I don't know how to change
strings with macro. (But still possible in runtime)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu