Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ollydbg on January 23, 2009, 10:39:59 am

Title: Can not open a header file in codeblocks
Post by: ollydbg on January 23, 2009, 10:39:59 am
Hi, I'm using codeblocks svn 5382 and windows xp.
It seems that I can't open a header file(It is a header file in the Opencv library). Nothing appeared in the source window.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=9986.0;attach=3057)
I can open it with NOTEPAD++.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=9986.0;attach=3059)
So, is there something wrong with the Encoding? I have tried several types, but still can't open it.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=9986.0;attach=3061;image)
I add the header file as a zip file.
Could you help me?
Thank you!

[attachment deleted by admin]
Title: Re: Can not open a header file in codeblocks
Post by: Jenna on January 23, 2009, 10:57:15 am
Did you try to use UTF-8 as default-encoding ?
Title: Re: Can not open a header file in codeblocks
Post by: ollydbg on January 23, 2009, 11:14:34 am
Yes, I have tried, but still can't see anything :(
Thanks.
Title: Re: Can not open a header file in codeblocks
Post by: ollydbg on February 01, 2009, 12:34:23 pm
Hi, I found that some file still can't be opened in code::blocks. svn5382.
I'm using windows xp simplified Chinese edition. See the screen shot below.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=9986.0;attach=3092)


[attachment deleted by admin]
Title: Re: Can not open a header file in codeblocks
Post by: starofrainnight on February 03, 2009, 05:26:50 am
I has been met this situation before, you could try to set "Default encoding when opening files" to ISO-8859-1, and restart code::blocks. Then, try to just open the specific file by code::blocks.

Or, you could convert all these invisible files from encoding "ISO-8859-1" to "UTF-8" through iconv program (Be Careful!!).

I don't know if this help, God Bless!  :lol:

It seems that code::blocks recognize the ISO-8859-* as UTF-8 (when you set the default encoding to UTF-8), and there have some characters couldn't recognize by UTF-8 encoding, code::blocks sucks then.... ( Notepad++ will skip it off )
Title: Re: Can not open a header file in codeblocks
Post by: ollydbg on February 03, 2009, 06:56:02 am
I has been met this situation before, you could try to set "Default encoding when opening files" to ISO-8859-1, and restart code::blocks. Then, try to just open the specific file by code::blocks.

Or, you could convert all these invisible files from encoding "ISO-8859-1" to "UTF-8" through iconv program (Be Careful!!).

I don't know if this help, God Bless!  :lol:

It seems that code::blocks recognize the ISO-8859-* as UTF-8 (when you set the default encoding to UTF-8), and there have some characters couldn't recognize by UTF-8 encoding, code::blocks sucks then.... ( Notepad++ will skip it off )

Thanks, Set to "ISO-8859-1", and restart C::B can solve this problem!
Thank you very much!