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

Source file encoding (Unicode, ANSI, etc.)

(1/3) > >>

280Z28:
Applies to 1648 in codeblocks/src

Feel free to test it

Sam

There are some bugs in the patch that was here that are fixed in the patch in the next post. Revert this patch (if you applied it) before applying the next one.

[attachment deleted by admin]

280Z28:
Included feature I didn't mention:
 - Work with files in a specified language (so for example, you can set the highlighter for a .temp file to C/C++ if you want)

Known bugs in the above patch:

 - The "View->Set Highlighter" menu is not disabled when you don't have a source file open. This is fixed in the patch attached to this post.
 - Doesn't detect presence of BOM when opening a file.
 - Always opens in the system default encoding to start with; doesn't try to figure out the encoding based on BOM or presence of lots \x00 characters, even though it could. There is a specific place where this could be improved: cbEditor::DetectEncoding() is called when it needs to be. Implement just that function to add this feature.
 - On some systems (mine at home), the toolbar combo box to select the current highlighter doesn't display. On others (like mine at work), it does.  :?

Included bugfix I didn't mention:
 - If a opened file is externally deleted and the user chooses not to keep it open when Code::Blocks asks, it is closed but not removed from the open files list.
 - When a file in the editor changes it's Modified state, the title bar is not updated with (or to remove) the asterisk indicator.

This patch applies to 1651 in codeblocks/src

[attachment deleted by admin]

David Perfors:
shouldn't patches be posted in the patchmanager?

280Z28:

--- Quote from: mispunt on January 03, 2006, 04:23:44 pm ---shouldn't patches be posted in the patchmanager?

--- End quote ---

Ones that people think should be merged into svn should :)

I'm just trying to get some feedback here, but it ain't happenin'. :o

David Perfors:
For me it doesn't add anything usefull (it doesn't matter what kind of encoding I use). But perhaps for people who are using non standard (<- this is standard for me ;)) characters, it could be very usefull....

Navigation

[0] Message Index

[#] Next page

Go to full version