ide: fix removing ASCSTRING_OCTALHI when generating Java jt files (Java string is Unicode based and per-byte utf8 OCTALHI translates to the wrong characters)

git-svn-id: svn://ultimatepp.org/upp/trunk@5419 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2012-10-09 19:34:12 +00:00
parent be65f52791
commit 1ef2eafca4
3 changed files with 11 additions and 8 deletions

View file

@ -10,6 +10,7 @@ uses
ide\Browser,
CodeEditor,
CtrlLib,
Web,
plugin\bz2,
HexView,
art\BlueBar,
@ -88,12 +89,13 @@ file
Copying;
mainconfig
"" = "GUI SSE2",
"" = "GUI",
"" = "GUI .USEMALLOC",
"" = ".NOGTK GUI",
"" = "GUI HEAPDBG CHECKINIT",
"" = "GUI TESTINSTALL",
"" = "GUI CHECKCLIPBOARD";
"" = "GUI CHECKCLIPBOARD",
"" = "GUI SVO_VALUE";
custom() "",
"",

View file

@ -9,6 +9,7 @@
#include "ide\Browser/init"
#include "CodeEditor/init"
#include "CtrlLib/init"
#include "Web/init"
#include "plugin\bz2/init"
#include "HexView/init"
#include "art\BlueBar/init"

View file

@ -130,9 +130,13 @@ bool LngParseTFile(const String& fn, VectorMap<String, LngEntry>& lng)
String CreateTFile(const VectorMap<String, LngEntry>& map, const Vector<int>& lngset, bool rep, bool obsolete, bool java)
{
const char *linepfx = (java ? " + " : " ");
int ascflags = (java ? 0 : ASCSTRING_OCTALHI) | ASCSTRING_SMART;
String out;
String cfile;
out << "#ifdef _MSC_VER\r\n#pragma setlocale(\"C\")\r\n#endif";
for(int i = 0; i < map.GetCount(); i++) {
if(i) out << "\r\n";
const LngEntry& e = map[i];
@ -148,10 +152,7 @@ String CreateTFile(const VectorMap<String, LngEntry>& map, const Vector<int>& ln
}
if(!IsNull(cfile) || rep || obsolete) {
String id = map.GetKey(i);
out << "T_(" << AsCString(id, 70,
java ? " + " : " ",
ASCSTRING_OCTALHI | ASCSTRING_SMART)
<< ")\r\n";
out << "T_(" << AsCString(id, 70, linepfx, ascflags) << ")\r\n";
for(int j = 0; j < lngset.GetCount(); j++) {
int lang = lngset[j];
if(rep || lang != LNG_enUS) {
@ -172,8 +173,7 @@ String CreateTFile(const VectorMap<String, LngEntry>& map, const Vector<int>& ln
}
}
out << '(' << AsCString(q >= 0 ? e.text[q] : String(), 70,
java ? " + " : " ",
ASCSTRING_OCTALHI | ASCSTRING_SMART) << ")\r\n";
linepfx, ascflags) << ")\r\n";
}
}
}