Author Topic: Can not open a header file in codeblocks  (Read 10574 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Can not open a header file in codeblocks
« 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.

I can open it with NOTEPAD++.

So, is there something wrong with the Encoding? I have tried several types, but still can't open it.

I add the header file as a zip file.
Could you help me?
Thank you!

[attachment deleted by admin]
« Last Edit: January 23, 2009, 10:42:27 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Can not open a header file in codeblocks
« Reply #1 on: January 23, 2009, 10:57:15 am »
Did you try to use UTF-8 as default-encoding ?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can not open a header file in codeblocks
« Reply #2 on: January 23, 2009, 11:14:34 am »
Yes, I have tried, but still can't see anything :(
Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can not open a header file in codeblocks
« Reply #3 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.



[attachment deleted by admin]
« Last Edit: February 03, 2009, 03:03:58 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline starofrainnight

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Can not open a header file in codeblocks
« Reply #4 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 )

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can not open a header file in codeblocks
« Reply #5 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!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.