News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

I cant open my file.cpp anymore

Started by VUT, April 18, 2011, 12:04:53 AM

Previous topic - Next topic

VUT

Hello ,

Codeblocks cant read my source file anymore. It open the file and write this:


⍩湣汵摥‼卆䵌⽇牡灨楣献桰瀾ਊ畳楮朠湡浥獰慣攠獦㬊੦汯慴⁨㴰ⱸⱹⱭ潶敹㴰Ɑ潶敹㈽〬浯癥礳㴰ⱡ湧汥㴰ⱸ㈬砱ⱸ㌻ਊ楮琠浡楮⠩੻ਊ


by other editors I am able to open the same file and  all works fine.

Can you help me pls? I cant work

OS : ubuntu 10.10
Codeblocks : 10.05
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5


Edit:
In order to avoid this 'bug' i must save file without files's extension


MortenMacFly

Can you provide a sample so we can reproduce? What's your locale, what is your settings under Settings -> Editor -> tab "Other settings" -> everything related to encoding?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

VUT

#2
It happened right now  :shock:

my setting are a bit different from default

caret  width 3
Colour green
Period  305

You have to play with these Styles ( Allman, K&R,Stroustrup,Gnu,Linux) then format the code, save the file , close and open it
try an other style and repeat . I did that several times ( about 10 )
There are two bug

1) Codeblocks add NULL char to source and gcc return this msg <<warning: null character(s) ignored>>
you can see null char from an external editor. from external editor : http://img130.imageshack.us/img130/1951/bugll.png
2) file is corrupted



Add:
if you copy and paste some code's lines from file corrupted to new external file , no weird char will be printed .
then you open it by codeblocks but the file will be still corrupted by second bug ( wrong font ).
sry for bad english


Jenna

Quote from: MortenMacFly on April 18, 2011, 07:06:23 AM
Can you provide a sample so we can reproduce? What's your locale, what is your settings under Settings -> Editor -> tab "Other settings" -> everything related to encoding?

Providing a sample means: attach a corrupted file or give a step by step description how to reproduce reliable.
If possible attach the corrupted and the correct version of the same file.

VUT

#4
open file
change style to k&r ( or other styles Allman, K&R,Stroustrup,Gnu,Linux)
plugin-> source code formatter (Astyle)
save and close
open the file again

Added attachments .txt extension

http://img197.imageshack.us/img197/9720/screenoy.png
italy


Jenna

If you chose UTF-16BE as default-encoding, it is not a bug if the file is saved as UTF-16BE.

I suggest using a more common file-encoding, UTF-8 should be enough and not cause problems with other editors and gcc.

VUT

 :? thanks . My cpu is little-endian...my fault   :(