Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Request feature: Win only, OEM

(1/3) > >>

kisoft:
I have few the big projects. They started in OS/2 and migrate to Win and Linux now.
Sources use OEM charset. For use other charsets used decoders (for ex. OEM to Win).
Now I use Terminal fonts for normal view sources, but I have troubles with keyboard input.


Add to Editor Property: OEM Yes/No.
This parameter use on open and save files for win version only.
On Open and Save file - decode it.
For decode use Win API functions CharToOEM*, OEMToChar*.
Unicode supported (for ex. CharToOEMW exist).


Problem may be one more wide, than look.

Thanks.

PS I would look a cdeditor sources for patch it.

thomas:
Hmm, I have to admit that I don't understand what exactly you're talking about, because I have no idea what "OEM charset" is supposed to be.

Anyway, lets just say you have your sources in some strange, evil charset.

1. Do you think it will help if the editor alone understands your charset? If you don't translate them alltogether, the compiler will not be able to read your sources either, so it will be pretty useless.
2. Have you tried gnu recode? I have no clue about "OEM", but recode reads and writes just about everything that exists.
3. Have you considered writing a plugin that reads in all files from a project, runs the text through OEMToChar, and saves the text again? This would be a lot easier and more straightforward than modifying the editor and would solve the problem with the compiler, too.

Michael:
Hello,

OEM charset (Original Equipment Manufacturer) are "the 8th bit often contained characters for line drawings as a carry over from pre-GUI (Graphics User Interface) days. Used by DOS, OS/2, floppy disks, and the FAT system (File Allocation System)". Some info can be found here:

http://www.georgehernandez.com/h/xComputers/CharacterSets/Index.htm

May be this small program could be of some help for you:

http://icc.dk/freeware/ansikonv.htm

If GNU recode would not be helpful, Thomas's suggestion to write a plugin is a good alternative. A plugin that read OEM files and convert them to Char by using the OemToChar function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/oemtochar.asp).

Best wishes,
Michael

PS.: Anyway, interesting tool recode. I did not know it.

kisoft:

--- Quote from: thomas on November 01, 2005, 02:59:20 pm ---Hmm, I have to admit that I don't understand what exactly you're talking about, because I have no idea what "OEM charset" is supposed to be.

Anyway, lets just say you have your sources in some strange, evil charset.

--- End quote ---

OEM charset - DOS charset (codepages for ex. 437, 866 and some other).


--- Quote ---1. Do you think it will help if the editor alone understands your charset? If you don't translate them alltogether, the compiler will not be able to read your sources either, so it will be pretty useless.

--- End quote ---

OEM affect for charcodes > 0x7F (literal strings only). No problem for compiler. For example, I have russian messages into program.
Look this: printf( "Ïðèìåð ðóññêîãî òåêñòà\n" );
Translated text: "Example of russian text\n"


--- Quote ---2. Have you tried gnu recode? I have no clue about "OEM", but recode reads and writes just about everything that exists.
3. Have you considered writing a plugin that reads in all files from a project, runs the text through OEMToChar, and saves the text again? This would be a lot easier and more straightforward than modifying the editor and would solve the problem with the compiler, too.

--- End quote ---

No problem recode all source files to Win charset, for ex. But I can't use this way now. May be later.

I taste MED (http://www.med-editor.com), this program can use an OEM charset without problem.
If it hardly in C::B, I would search another way.

Thanks you for suggestions.

thomas:
Try this. No guarantees, whacked that together in ~10 minutes, but it should do.


[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version