Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Editing/opening Lua files bug
Indrekis:
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.
stahta01:
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
Indrekis:
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.
Biplab:
--- Quote from: Indrekis on October 10, 2007, 01:58:45 am ---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.
--- End quote ---
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.
MortenMacFly:
--- Quote from: Biplab on October 10, 2007, 04:20:06 am ---If you want to work with a UTF-8 file on Windows, try to disable CC.
--- End quote ---
Or maybe we should just fix the issues we had pinpointed - remember? ;-)
Navigation
[0] Message Index
[#] Next page
Go to full version