Author Topic: WIN-API - stupid errors.  (Read 14157 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: WIN-API - stupid errors.
« Reply #15 on: January 03, 2008, 05:39:51 pm »
On the bottom is: UTF-7 Line 1, Column 1, Insert, Read/Write, defualt
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: WIN-API - stupid errors.
« Reply #16 on: January 03, 2008, 05:42:05 pm »
Try changing it to UTF-8 / Windows-1252.
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: [Select]
+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-
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.
« Last Edit: January 03, 2008, 05:46:25 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: WIN-API - stupid errors.
« Reply #17 on: January 03, 2008, 05:58:32 pm »
Try changing it to UTF-8 / Windows-1252.
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: [Select]
+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-
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.

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.

« Last Edit: January 03, 2008, 06:06:47 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline Culfa

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: WIN-API - stupid errors.
« Reply #18 on: January 03, 2008, 06:54:58 pm »
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

Offline Culfa

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: WIN-API - stupid errors.
« Reply #19 on: January 04, 2008, 01:21:05 pm »
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...  :?
« Last Edit: January 04, 2008, 03:51:59 pm by Culfa »