User forums > Help

WIN-API - stupid errors.

<< < (4/4)

MortenMacFly:

--- Quote from: Culfa on January 03, 2008, 05:09:47 pm ---On the bottom is: UTF-7 Line 1, Column 1, Insert, Read/Write, defualt

--- End quote ---
Looks good - that's the status line.

I can reproduce if I set the encoding to UTF-7. Ok - so in order fto fix this please choose a different (e.g. "default") encoding and it'll work.

MortenMacFly:

--- Quote from: Biplab on January 03, 2008, 05:36:34 pm ---Try changing it to UTF-8 / Windows-1252.

--- End quote ---
Aaaah - the unicode master is on-line. ;-) This is a strange issue. If you copy/paste the content of this file into a "usual" encoded one it works. Then if you choose Edit > file encoding -> UTF-7 and save the file it will stop working. The reason is that the content now looks like this (the first lines...):

--- Code: ---+ACM-include +ADw-windows.h+AD4-

/+ACo-  Declare Windows procedure  +ACo-/
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM)+ADs-

/+ACo-  Make the class name into a global variable  +ACo-/
char szClassName+AFs- +AF0- +AD0- +ACI-CodeBlocksWindowsApp+ACIAOw-

--- End code ---
Is that how it should look like, Biplab? ...or did we find an error, possibly?!
Edit: Answering myself: Yepp, looks like proper UTF-7. But: If you close the editor and re-open it it is not detected as UTF-7. Thus you see the +AC... in C::B. That is no good.

With regards, Morten.

Biplab:

--- Quote from: MortenMacFly on January 03, 2008, 05:42:05 pm ---
--- Quote from: Biplab on January 03, 2008, 05:36:34 pm ---Try changing it to UTF-8 / Windows-1252.

--- End quote ---
Aaaah - the unicode master is on-line. ;-) This is a strange issue. If you copy/paste the content of this file into a "usual" encoded one it works. Then if you choose Edit > file encoding -> UTF-7 and save the file it will stop working. The reason is that the content now looks like this (the first lines...):

--- Code: ---+ACM-include +ADw-windows.h+AD4-

/+ACo-  Declare Windows procedure  +ACo-/
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM)+ADs-

/+ACo-  Make the class name into a global variable  +ACo-/
char szClassName+AFs- +AF0- +AD0- +ACI-CodeBlocksWindowsApp+ACIAOw-

--- End code ---
Is that how it should look like, Biplab? ...or did we find an error, possibly?!
Edit: Answering myself: Yepp, looks like proper UTF-7. But: If you close the editor and re-open it it is not detected as UTF-7. Thus you see the +AC... in C::B. That is no good.

With regards, Morten.

--- End quote ---

I'd rather blame it on encoding detection and conversion routine. There is no code to handle UTF-7 encoding unless the fallback code detects it and converts it. For the time being you should avoid using this encoding. :)

I'll investigate it this weekend.

Culfa:
Ahhhh .... :) It works now :) I changed the File Encoding to WINDOWS 1252 and it works perfect:) There are only "normal" errors^^

Big thanks to all :)

Thread can be close

Culfa:
OK... I started today C::B once more, but now, there are the stupid errors again... I changed the file encoding to UTF-8, saved, with BOM, than to WINDOWS-1252, and then to default. But there are again the stupid errors -.-


-------------- Build: Debug in newone ---------------

cl.exe /nologo /W3  /Zi /D_DEBUG    /I"C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\include" /I"C:\Programme\Microsoft Visual Studio 9.0\VC\include" /I"C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Include" /I"C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Lib"  /c fenstercreate.cpp /Foobj\Debug\fenstercreate.obj
fenstercreate.cpp
fenstercreate.cpp(1) : error C2059: syntax error : '+'
fenstercreate.cpp(3) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(6) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(6) : error C2589: '+' : illegal token on right side of '::'
fenstercreate.cpp(9) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(36) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(49) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(79) : error C2653: 'cGame' : is not a class or namespace name
fenstercreate.cpp(90) : error C2653: 'cGame' : is not a class or namespace name
Process terminated with status 2 (0 minutes, 0 seconds)
9 errors, 0 warnings

What can I do now?

edit: Lol after a lot of changing of the default encoding, it works now. But C::B does not save the Settings...  :?

Navigation

[0] Message Index

[*] Previous page

Go to full version