HOME - WEBDESIGN / IPHONE APP - ALL IN VAIN - PICTURES - FORUM - DEVELOPEMENT - MYSPACE - TWITTER - YOUTUBE - CATEGORIES - Login/Registration - RSS

Countdown bis zum Greenfield 2011:


sqlite3 umlauts/special character problem


in Anleitung,Computer,Development,How-To,iPhone,Weblog,XCode @ 14:42 am 8. März 2011
Comments: 1

When you are developing an iPhone application, you will most likely have to use an internal database to store your data. I also needed a database for my Facts iPhone application. As the app contains german words, it also contains umlauts and special characters like äöü and all this stuff that is not present in the english language. However, I was not able to support these special characters although I used UTF8 encryption in my application.

To create the database, I used the following commands in terminal:

cd Desktop
mkdir FactsDatabase
cd FactsDatabase
sqlite3 facts.sqlite

Now you will see the sqlite command prompt which only accepts sql commands from now on. This is where I have created my database, and inserted some facts:

// create table
create table facts(id integer primary key, fact text, isFavorite varchar(5), alreadyRead varchar(5));

// fill database with facts
sqlite3 facts.sqlite “INSERT INTO facts(fact, isFavorite, alreadyRead) values(‘Täglich werden 12 Neugeborene den falschen Eltern gegeben.’, ‘no’,'no’);”

Now if you do it like this, the special characters won’t show up in your application. After some hours of trying I tried to use run my sqlite commands in a shell script. I had to rearrange the commands to fit like this:

# drop exising table
sqlite3 facts.sqlite “drop table facts;”

# create database
sqlite3 facts.sqlite “create table facts(id integer primary key, fact text, isFavorite varchar(5), alreadyRead varchar(5));”

# fill database with facts
sqlite3 facts.sqlite “INSERT INTO facts(fact, isFavorite, alreadyRead) values(‘Täglich werden 12 Neugeborene den falschen Eltern gegeben.’, ‘no’,'no’);”

Save it as database.sh and in terminal, give it the rights to execute: chmod+x database.sh, and then run it with ./database.sh
If you do it like this, the special characters are finally in the database and will show up in your application. To be honest, I have no idea why it only works with this workaround. It costed me quite a bit of time. Anyway, hope that helps anyone. If you have questions, use the comment section. Cheers.


An Twitter senden, Geposted von Pädde


doonot.com goes iphone!


in Allgemeines,Bekanntgabe,Development,iPhone,iPod Touch,News,Weblog,Website @ 13:02 am 29. November 2008
Comments: 0

So nach ein paar Stunden hab ichs nun endlich geschafft. Für die iPhone oder iPod Touch User unter euch gibts jetzt ein eigenes iPhone Template. Dass heisst, wenn ihr einen Internet User Agent als “iPhone” oder “iPod” habt, bekommt ihr automatisch ein iPhone Kompatibles Template zugewiesen.

Somit lädt die Site viel schneller im Safari und ihr müsst nicht alle Bilder laden, die Ihr nicht sehen möchtet!

Dieses Plugin für WordPress habe ich selbst programmiert. Wenn jemand Lust daran hätte, kann man mir via “Contact” einfach schreiben!

An Twitter senden, Geposted von Pädde


typecast!!


in Allgemeines,Gefühle,Musik,Weblog @ 16:33 am 28. November 2008
Comments: 0

Ich höre schon seit etwa 2 Jahren Typecast. Das ist ne Band aus den Phillipinen (sehr warscheinlich noch falsch geschrieben). Ja, die können da auch ziemlich rocken! Schaut euch mal dieses Video an. Live aufgenommen in den Towerrecords. Wer weiss, vielleicht kommen die Jungs auch mal in die Schweiz?

Der Song Last time ist ein typischer emo song. ABER ICH BIN KEIN EMO, ich seh nur so aus und hör solche musik :p

An Twitter senden, Geposted von Pädde


doonot, neuer webauftritt…


in Allgemeines,News,Weblog,Website @ 00:10 am 2. Oktober 2008
Comments: 4

Sooooooo, Endlich, nach gut 4 Stunden hab ich jetzt meinen neuen Webauftritt grundsätzlich fertig. Änderungen und Verbesserungen wird es Laufend geben.

Was soll das ganze hier?

Ich habe mir gedacht, ich könnte auch mal als wirklicher Blogger einsteigen. Schreiben was einen so bewegt, was man gerade macht, an was man arbeitet und wies einem geht, und das alles öffentlich. Am Anfang schreiben hier nur ich und Genc, wenn jemand Interesse hat, einfach ne Mail schreiben (doonot@doonot.com)!

An Twitter senden, Geposted von Pädde