Code::Blocks Forums
User forums => Help => Topic started by: mavri on May 04, 2010, 04:17:01 pm
-
hi
perhaps I posted in the wrong forum (using CB)... in a week 63 have read the post but none answered
I think it may be a general problem for non-usa keyboards. and I guess there is people that knows how to cope such matters.
for this reasons I post the quoted text in this general forum
thanks
:shock: Mavri
I'm just starting to use the system (version 8.02 for Windows) with MinGW because the C-free environment I used has problems with VISTA
I installed CB on my HP laptop Probook 4310s with XP as a first step
The problem I experiment is simple but basilar for C programming
The editor is not accepting characters like { and } :cry:
On my laptop with italian keyboard I use the combination Alt+nnn for typing the not listed characters
Becouse the separate numeric keyboard I have to do Fn+Alt+nnn
THis features is ok with all computers and programs I experimented
But the editor of the system is not accepting (at least) the two combination for { and } that are Alt+123 and 125
I experimented all the other combinations and noticed that (very strange) the even numbers are working while the odd numbers are not.
For instance Alt+122 is 'z' and Alt-124 is '|' but there is not 123 and 125 combinations.
I verified that in output a program with various printf for numerical values in the range are working.
At the moment the only possibility is to use a shortcut for (for instance) struct and then delete the keyword struct and leave the 2 brackets
But this is a workaround and not a solution
Is anyone experimenting the same problem? I would like to test the system in order to use it for my teaching activity
thanks.
-
Hi Mavri,
I think that the problem you experience is related to the encoding of your source file. The " { " character of the Italian keyboard most probably is not compliant with the encoding expected in your source file, so it produces this undesirable behavior.
I've tried this with a Greek and Hindi keyboard, and the results are somewhat erratic. I get a warning from CodeBlocks noting that my code contains characters from a different encoding than the expected one (probably ASCII), and that the encoding of the source file will be changed to Unicode to prevent problems. In my case, the non-English " { " and " } " are parsed fine when using the Greek keyboard. The Hindi keyboard doesn't have those characters at all so I can't test it.
Still, I think that in order to write code you pretty much need to have your keyboard set to English. Otherwise such encoding problems are apt to occur, even if the non-English characters you type look like their English equivalents. So I would suggest to simply change your keyboard to English while you code, and you wouldn't have this occur.
I do understand that coding in non-English characters can work at times too, but it seems to me that the system isn't designed to work that way.
I hope this helps somewhat. Regards,
Okaya