Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
SVN-HEAD binaries download
thomas:
I do not know why this particular file does not display, but it certainly has nothing to do with Code::Blocks not having support to open non-UTF files.
If Code::Blocks could not open non-UTF files, then I would be unable to open 99% of my own sources...
thomas:
You can prove that this problem is not due to missing non-UTF support by doing as I just did:
Open the file Editor.cxx in SciTE, and save 5 separate copies of the same file, each using a different encoding method. Then drag all these files onto Code::Blocks.
You will see that it opens none of them, regardless of whether they are 8-bit encoded, UTF-8 encoded with or without cookie, or UCS-2 encoded in either big or little endian (the latter is not surprising, UCS-2 is indeed not supported).
It does not matter how this particular file is encoded, it does not work either way.
Obviously there is a (yet unknown) issue with certain files, but it is certainly not "Code::Blocks has no support for opening non-UTF files".
280Z28:
thomas, you have to realize that ASCII files are also UTF8. Many files can be saved in multiple charsets and have exactly the same bytes. However, if one of them is saved in a format that conflicts with UTF8, C::B will not open it for the time being. I'm working on a fix, but it's difficult. But I was not wrong in my statement, either.
C::B simply does not support opening files that are not UTF8. Unfortunately it's not a 5 minute fix. I'll make a thread later today with my suggestion for how C::B could truly handle the different charsets. :)
tiwag:
all files in "src\sdk\as\source" are not opened in CB
thomas:
--- Quote from: 280Z28 on January 02, 2006, 03:22:35 pm ---thomas, you have to realize that ASCII files are also UTF8.
--- End quote ---
Incorrect/inaccurate information. This is only true (coincidally) for character codes below 127.
Here is a file which quite obviously has characters outside that range and which is quite obviously not UTF-encoded:
--- Code: ---$ cat müll.cpp
// ▒1 sch▒ner M▒ll mit vielen Umlauten, so da▒ auch Sam sehen kann,
$ hexdump müll.cpp
0000000 2f2f a720 2031 6373 f668 656e 2072 fc4d
0000010 6c6c 6d20 7469 7620 6569 656c 206e 6d55
0000020 616c 7475 6e65 202c 6f73 6420 df61 6120
0000030 6375 2068 6153 206d 6573 6568 206e 616b
0000040 6e6e 0d2c 2f0a 202f 2020 7720 7361 6620
0000050 72fc 6520 6e69 fc20 6c62 7265 202c 62fc
0000060 7265 6c66 73fc 6973 6567 2072 6e55 6973
0000070 6e6e 6420 7361 6920 7473 2e2e 002e
000007d
--- End code ---
And here is the file opened and correctly displayed in Code::Blocks
EDIT: Strictly speaking, you are right in some way, since ASCII is strictly only 7 bits... but that does not matter for the example.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version