Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Indrekis on October 09, 2007, 09:48:45 pm
-
Hello, All!
I have encountered an interesting bug.
For lua files with enabled syntax highlighting, letter "К" (from cyrillic alphabet, in Win1251 has code 0CAh), completely hangs Code::Blocks. This occurs when "К" is typed in and then saved, or a lua file, which contains this letter is opened. It looks like position of the letter in the file does not matter.
For C/C++ files this letter do not cause any problems. When lua syntax highlighting is disabled, the problem does not persist too. I am not sure that only this cyrillic symbol hang CB.
This letter does not cause any problems for SciTE 1.67 with Lua highlights.
"Tested" in several revisions between 4410 and 4517. Exist both in self-compiled CB and in nightly builds. My OS - WindowsXP SP2.
-
I have no idea if it makes a difference, but what is
"Settings" -> "Editor" value for "default encoding when opening files" set to?
You might try different setting and reopen the file and test adding the letter again.
Tim S
-
It was set to Windows-1251.
After changing it to something other CB hang during opening lua file with the letter too.
Later I set it to UTF-8, entered the letter and saved the file. CB hangs. File become converted to UTF-8 (UTF-8 code of "К" is D0h 9Ah, or U+041A). After restarting CB I opened the file. CB hanged again.
Note: The hang occurs somewhere after the file is saved - file remains intact and contains latest changes.
-
It was set to Windows-1251.
After changing it to something other CB hang during opening lua file with the letter too.
Later I set it to UTF-8, entered the letter and saved the file. CB hangs. File become converted to UTF-8 (UTF-8 code of "К" is D0h 9Ah, or U+041A). After restarting CB I opened the file. CB hanged again.
Note: The hang occurs somewhere after the file is saved - file remains intact and contains latest changes.
This is a well-known problem. At the moment, C::B can support upto UTF-8. But Code-completion (CC) hangs. And sometimes the file load routine (with character set conversion) hangs, too.
I have overhauled the Unicode support of C::B in terms of File Load (with auto-detection) and Saving. But at the moment I can't apply the patch as CC will then hang C::B.
If you want to work with a UTF-8 file on Windows, try to disable CC.
-
If you want to work with a UTF-8 file on Windows, try to disable CC.
Or maybe we should just fix the issues we had pinpointed - remember? ;-)
-
If you want to work with a UTF-8 file on Windows, try to disable CC.
Or maybe we should just fix the issues we had pinpointed - remember? ;-)
Yes. We should. :)
-
Biplab, thank you for your answer, disabling code completion plugin helped :)
If you want to work with a UTF-8 file on Windows, try to disable CC.
Though, I must admit, that problem was encountered, while using Win-1251 and only for lua files and only for this letter. At least all is OK for C/C++ files and several other cyrillic letters in lua files.
UTF-8 appeared just during investigations, performed after stahta01 suggestion.
Biplab, I am sorry, I've misapprehend your phrase "And sometimes the file load routine (with character set conversion) hangs, too". Because of it second part of my comment is inappropriate.
-
As of revision 4551 everything is OK
Many thanks to the developers!
-
As of revision 4551 everything is OK
Many thanks to the developers!
Nice to know that it works. Please upgrade to 4554 as it would fix one possible detection issue. :)