The string is in the current format because it allows visual inspection for errors. Using \x escapes would obscure the meaning. The current format is also smaller.
Which compiler is not working? If there is an error message, what does it say?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found that problem compiling and using Notepad2-mod(http://xhmikosr.github.io/notepad2-mod/).
And newest version(4.2.25.870) uses Scintilla v3.3.4. (CaseConvert.cxx is added in this version)
I use WDK and VC++2010 Express.
Both of them compile successfully, but, when I use find/replace function it crashes.
And, VC debugger told that function crashes.
BTW, official build by XhmikosR doesn't crashes.
Could different language environment cause that problem?
Hmmm.....
I wrote "not be compiled properly"...
Sorry for confusion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's weired...
When compiled in my language(Korean) environment it happens always. (WDK and VS2010Exp)
But, officially released notepad2-mod doesn't crashes.
I post notepad2.exe and test.txt.
You can see the problem.
Just find any string.
It also hangs if the search is case-sensitive which shouldn't call the CaseConvert module.
I can't reproduce the hang with SciTE using VS2010 Express with an Australian English locale. You could try debugging the actual hang by placing a breakpoint at the start of the failing function and tracing execution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Neil: my locale is Greek and I do get a compiler warning using VS2012 but the build apparently works fine:
src\CaseConvert.cxx : warning C4819: The file contains a character that cannot be represented in the current code page (1253). Save the file in Unicode format to prevent data loss [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla.vcxproj]
The weird thing is that CaseConvert.css is already UTF-8. I tried with BOM but the warnings are many more.
Also, with Intel compiler 2013 I get more meaningful warnings:
src\CaseConvert.cxx(288): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"ά╛Τ|ά╝λ╬╣|ά╝ς╬β||"
^
src\CaseConvert.cxx(296): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"ά╛γ|ά╝λ╬╣|ά╝ς╬β|ά╛Τ|"
^
src\CaseConvert.cxx(304): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"ά╛λ|ά╜λ╬╣|ά╜ς╬β||"
^
src\CaseConvert.cxx(312): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"ά╛ς|ά╜λ╬╣|ά╜ς╬β|ά╛λ|"
^
src\CaseConvert.cxx(312): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"ά╛ς|ά╜λ╬╣|ά╜ς╬β|ά╛λ|"
^
src\CaseConvert.cxx(347): warning #913: invalid multibyte character sequence [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla_icl13.vcxproj]
"έΕς|k||k|"
^
I hope this helps.
Last edit: XhmikosR 2013-07-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is quite a mess as different versions of Visual C++ behave differently. There is a pragma that works with some releases of Visual C++ 2008, 2010 and 2013 but not 2012:
I compared *complexCaseConversions from my build with same one from yours.
And, I found they are different.
Attached file "extracted_my_notepad2" is extracted from my build(in Korean code page: 949)
And, "extracted_from_scilexer_or_notepad2" is from official notepad-mod and/or scilexer.dll.
There are lots of "?"(0x3f) in my build.
And I's sure, it means "There is lots of chars which cannot be converted from unicode".
You can see the difference at attached "comparison.png"
To create same result at any code page, I recommend you to change *complexCaseConversions in CaseConvert.cxx to attached "CaseConvert_edited.cxx"
It is created from "extracted_from_scilexer_or_notepad2"
And... Thanks for reading my poor English and testing, both of you. ;)
The string is in the current format because it allows visual inspection for errors. Using \x escapes would obscure the meaning. The current format is also smaller.
Which compiler is not working? If there is an error message, what does it say?
I found that problem compiling and using Notepad2-mod(http://xhmikosr.github.io/notepad2-mod/).
And newest version(4.2.25.870) uses Scintilla v3.3.4. (CaseConvert.cxx is added in this version)
I use WDK and VC++2010 Express.
Both of them compile successfully, but, when I use find/replace function it crashes.
And, VC debugger told that function crashes.
BTW, official build by XhmikosR doesn't crashes.
Could different language environment cause that problem?
Hmmm.....
I wrote "not be compiled properly"...
Sorry for confusion.
You should find the simplest case that causes a crash and report the document text, search string, encoding, and search options.
It's weired...
When compiled in my language(Korean) environment it happens always. (WDK and VS2010Exp)
But, officially released notepad2-mod doesn't crashes.
I post notepad2.exe and test.txt.
You can see the problem.
Just find any string.
Thanks for reading.
It also hangs if the search is case-sensitive which shouldn't call the CaseConvert module.
I can't reproduce the hang with SciTE using VS2010 Express with an Australian English locale. You could try debugging the actual hang by placing a breakpoint at the start of the failing function and tracing execution.
@Neil: my locale is Greek and I do get a compiler warning using VS2012 but the build apparently works fine:
src\CaseConvert.cxx : warning C4819: The file contains a character that cannot be represented in the current code page (1253). Save the file in Unicode format to prevent data loss [H:\progs\Compiling\notepad2-mod\scintilla\Scintilla.vcxproj]
The weird thing is that CaseConvert.css is already UTF-8. I tried with BOM but the warnings are many more.
Also, with Intel compiler 2013 I get more meaningful warnings:
I hope this helps.
Last edit: XhmikosR 2013-07-30
This is quite a mess as different versions of Visual C++ behave differently. There is a pragma that works with some releases of Visual C++ 2008, 2010 and 2013 but not 2012:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/2f328917-4e99-40be-adfa-35cc17c9cdec/pragma-executioncharactersetutf8
I compared *complexCaseConversions from my build with same one from yours.
And, I found they are different.
Attached file "extracted_my_notepad2" is extracted from my build(in Korean code page: 949)
And, "extracted_from_scilexer_or_notepad2" is from official notepad-mod and/or scilexer.dll.
There are lots of "?"(0x3f) in my build.
And I's sure, it means "There is lots of chars which cannot be converted from unicode".
You can see the difference at attached "comparison.png"
To create same result at any code page, I recommend you to change *complexCaseConversions in CaseConvert.cxx to attached "CaseConvert_edited.cxx"
It is created from "extracted_from_scilexer_or_notepad2"
And... Thanks for reading my poor English and testing, both of you. ;)
Last edit: BLUEnLIVE 2013-07-31
Committed fix as [845df8].
Related
Commit: [845df8]