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

Request feature: Win only, OEM

<< < (2/3) > >>

kisoft:

--- Quote from: thomas on November 01, 2005, 05:58:35 pm ---Try this. No guarantees, whacked that together in ~10 minutes, but it should do.

--- End quote ---

Thanks for sources.
This way can't help. It's "one way ticket". On save file was corrupted. But it not main.
As I say early, really this work necessary make on open and save file (cbEditor::Open and cbEditor::Save).
And switch up it in editor properties.

I take an advatage of your method for temporary, may be.

I would have hear C::B developers suggestions.
If not, I solve this problem myself.

thomas:

--- Quote from: kisoft on November 02, 2005, 08:41:22 am ---This way can't help. It's "one way ticket".

--- End quote ---

Actually it is not one way. Just add another menu item "Char to OEM" and call the other function. This is 5 lines of code added.

kisoft:

--- Quote from: thomas on November 02, 2005, 10:36:25 am ---
--- Quote from: kisoft on November 02, 2005, 08:41:22 am ---This way can't help. It's "one way ticket".

--- End quote ---

Actually it is not one way. Just add another menu item "Char to OEM" and call the other function. This is 5 lines of code added.

--- End quote ---

You right, absolutely! Sorry, for my familiarity.

I solve my problem globally. I add An Editor Propery "Use OEM Charset" (see screenshot, checkbox: chkOEMCharset == "/editor/use_oem_charset").
Now on load file (cbEditor::Open) and on save file (cbEditor::Save) text recoded if this checkbox checked. It's work.
Last change now - recode opened files on change Editor Property "Use OEM Charset", and testing.
I ready to publish patch after testing if anybody need it.

Good luck!


[attachment deleted by admin]

thomas:
Actually, I just found out that wxScintilla supports OEM natively. Don't know how to configure the charset (yet), but wxscintilla.h contains this:

--- Code: ---#define wxSCI_CHARSET_OEM 255
--- End code ---

So it must be possible (and probably relatively easy, too) to edit whatever charset natively without converting anything.

kisoft:

--- Quote from: thomas on November 02, 2005, 12:56:10 pm ---Actually, I just found out that wxScintilla supports OEM natively. Don't know how to configure the charset (yet), but wxscintilla.h contains this:

--- Code: ---#define wxSCI_CHARSET_OEM 255
--- End code ---

So it must be possible (and probably relatively easy, too) to edit whatever charset natively without converting anything.

--- End quote ---

Yes, I see it. But wxScintilla::SetCodePage() not support this (docs sound it).
wxScintilla::SetStyle.. may be use, but docs - very bit small, and "time is money", I have many work now.
I try use it for a first time, but have noting result. May be later, then I found some times, I see this way again.

Thanks you for advice.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version