Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » console + sql + unicode or utf
console + sql + unicode or utf [message #32346] Tue, 10 May 2011 15:18 Go to previous message
begnur is currently offline  begnur
Messages: 6
Registered: May 2011
Location: Turkmenistan
Promising Member
I have this code and I cant read non US characters and also pass a character which is not ascci..
for example sql : select * from kelimeler where tur = "şık"

can you help me where is my problem (or what am I doing wrong..)

CONSOLE_APP_MAIN
{
	Sqlite3Session db;
	if(!db.Open(ConfigFile("sozluk.db"))) {
		Cout() << "Veritabanı oluşturulamıyor\n";
		return;
	}
	
#ifdef _DEBUG
	db.SetTrace();
#endif
	
	SQL = db;
	SQL.ClearError();
	
	Sql sql;
	sql.Execute("select tur from kelimeler where ing =\"hi\" limit(10)");
	//for(int i = 0; i < sql.GetColumns(); i++)
	//	Cout() << sql.GetColumnInfo(i).name << "\n";
	while(sql.Fetch())
		Cout() << sql[0] << "\n";
	Cout() << sql.GetColumns() << "\n";
	Cout() << L"Türkçe Karakterler şüğşlk\n";
}


by the way my databases is defined as follows

BEGIN TRANSACTION;
CREATE TABLE kelimeler (tur VarChar(100) NOT NULL, ing VarChar(100) NOT NULL);
INSERT INTO "kelimeler" VALUES('ne','what');
INSERT INTO "kelimeler" VALUES('bir','a');
INSERT INTO "kelimeler" VALUES('bir parça','a bar of');
INSERT INTO "kelimeler" VALUES('bir parça','a bit');
.
.
.
INSERT INTO "kelimeler" VALUES('genç erişkin','young adult');
CREATE INDEX idx_tur ON kelimeler(tur);
CREATE INDEX idx_ing ON kelimeler(ing);
COMMIT;
 
Read Message
Read Message
Read Message
Previous Topic: Format of Select statement inside Insert..??
Next Topic: SqlMassinsert
Goto Forum:
  


Current Time: Thu Jul 25 14:44:33 CEST 2024

Total time taken to generate the page: 0.01484 seconds