Notices


Reply
Thread Tools
Posts: 146 | Thanked: 76 times | Joined on Feb 2010 @ Poland
#141
Originally Posted by iloveu View Post
I figured it out. The trick is the CSV file must be encoded in UTF-8 without BOM rather than UTF-8.
For those who don't understand:BOM - Byte Order Mark

What this means:
In Windows most people edit their files in Notepad.
Unfortuantly what Notepad does for a UTF-8 file is save 3 strange charactes at the beggining -  (i+umlaut, double right guillemet, inverted question mark)
These characters are invisible when viewing/editing in Notepad.

I attached a file which has these symbols.
To view if a file has these symbols you can do:
Code:
head -1 bom.txt | od -a
just replace for bom.txt the name of your file.

So question is how to easily remove the BOM?
Attached Files
File Type: txt bom.txt (7 Bytes, 151 views)
 
Posts: 9 | Thanked: 1 time | Joined on Apr 2010
#142
Hi guys,

thanks a lot for everyone who contributed to this thread. I successfully imported 2000+ messages from my N95 and here are some of the things worth mentioning:

1- Which delimiter to use: I used the "|" letter (shift + \). Mainly, pick something you think won't appear in any of your text messages.

2- which binary to use: I used Ziller's binary from post #104 in this thread.

3- sorting messages: I sorted the messages based on time, putting the oldest ones at the beginning of the file, and the most recent files towards the end. To do this, I first rearranged every line so that the time was in the beginning, then I sorted the lines, then I rearranged every line again so that the time is in the right place. I used macros in Emacs (an editor) to do this.

4- I deleted all the lines that started with "mms" (only had two).

5- For the encoding, I have some Arabic messages. I first renamed the .csv file to .txt and opened it in Mozilla Firefox on my computer. I went to the "View->Character Encoding" tab in the menu and selected "Unicode (UTF-8)". I was able to see the Arabic text just fine. This means that the file was already UTF8 encoded. Note that I never editted the file in Notepad, and Firefox won't change encoding for you, it will only allow you to see what encoding the file has. To change encoding, see Robb's post (the 4th post before mine).

6- If this is your first time doing this, skip this step. Having done this twice before with failed results (using older binaries), I had to delete my el.db file on the device. This file's path is /home/user/.rtcom-eventlogger/el.db I rebooted after deleting it.

7- I followed the instructions, copied sms.csv and the binary to my phone using Mass Storage mode, copied them one level up to /home/user from /home/user/My Docs, enabled the +x bit on the binary using chmod, and ran the binary.

Results:

It took a long time to finish mainly because it printed every message to the screen. But, I now have all my messages in the conversation app sorted correctly, with names from the address book appearing correctly. Arabic font is there and looks great. I can delete individual messages.

Thanks a lot everyone!

Now, Nokia, wouldn't you want people to say thanks to you too? Why don't you go ahead and release an update to PC Suite that saves us all this trouble
I deleted all the MMS messages from the .csv file (there were only two). I also have some Arabic text in my messages, but it turned out that the encoding was UTF8 to begin with. To verify that, I

Originally Posted by ziller View Post
I added matrim's uuid bit to gagravarr's patched code and it seems to import even large linked messages with no problems and I can delete and forward any message I want...

Just imported a few thousand text messages on a vanilla n900, all is okay. I've attached the source and the compiled binary.


edit: the conversations app is dying on me on some individual messages though... I'm blaming this mainly on the special characters in the .csv file, probably nothing to do with the importer.

Last edited by Hamzeh; 2010-04-01 at 13:05.
 

The Following User Says Thank You to Hamzeh For This Useful Post:
Posts: 6 | Thanked: 0 times | Joined on Apr 2010
#143
Hi,

I'd first like to thank those who contributed into the development of the importer. It would truly help me.

I came across a problem though. I've typed in

cd /home/user
cp MyDocs/smsimporter MyDocs/sms.csv .
chmod +x smsimporter
run-standalone.sh ./smsimporter sms.csv

but it gives no response. It just takes me to the next line. What could be the problem?

If I type run-standalone.sh ./smsimporter only, it gives me this,
Usage: smsimporter <input csv file>
ex. smsimporter backup.csv

It's telling me to do exactly what I did before where I received no response.

The delimiter I am using is a semicolon which got rid of the segmentation fault. So what could be the problem here?

I'd really appreciate help on this matter.

Thank you!
 
Posts: 88 | Thanked: 84 times | Joined on Apr 2010
#144
It's about the third time I've read this topic and I'm still without results.

I've tried:
resolving semicolon issue. sms.csv is saved with semicolon ;
Tried the different versions of code (with cp, without, did it about 20, 30 times).
Opened sms.csv in excel, saved it. Did it in Wordpad, notebook. Did that for the semicolon-issue and UTF8 issue

Still no results. Sometimes it looks like it's going well, no errors but no conversations either. Sometimes "Error parsing line" errors, Sometimes segmentation fault (with semicolon!). I'm a noob on Linux, so half the code I've typed I don't understand.

Please, help me! What on earth am I doing wrong?
 
Posts: 49 | Thanked: 15 times | Joined on Jan 2010
#145
haha!! I succeed!!

parsing errors mean your csv line is not correct!
count your column and verify there is enough ; and ".You should have 8 columns!
here is an example of right lines :

sms;submit;"";"12345";"";"2010.04.07 00:00";"";"Tu t'en sors?"
sms;deliver;"12345";"";"";"2010.04.07 00:01";"";"oui enfin"



if your using linux edit your csv files with gedit or an other text editor that manage replacement of strings it is quicker! and better!
 
Posts: 1 | Thanked: 0 times | Joined on Apr 2010
#146
Hi.

LIke many others I'm surprised that Nokia and the developer-team haven't fixed this problem for us, but more I'm impressed by the effort from volounteers like many of you. Thanks for the effort.

I'm new in the forum, but I've followed you guys for some time. I'm also a novice to Linux and the N900 but I'm trying :-)

So far I've (finally) succeeded in getting the smsimporter to act at all. I seem to do the right things but the final step (run-standalone etc.) results in 47 lines of parsing error (I've 47 sms I'm eager to import).

I've edited my .csv file in Notepad, ensuring there are the right number of columns and quotation marks in the right places. I've deleted the international dial number (45 in Denmark) from the phone numbers leaving 8 digits. I've saved the edited .csv-file in UTF-8. And I have followed the otherwise well-written to-do lists to the dot.

Being new to both LInux and N900 this occationally becomes a bit tiresome, but on the other hand it's also challenging and fun. Only re-re-reading this thread I can't seem to find more things I can do.

Can any of you guys help me out?

Thanks in advance
 
Posts: 88 | Thanked: 84 times | Joined on Apr 2010
#147
Originally Posted by opax View Post
haha!! I succeed!!

parsing errors mean your csv line is not correct!
count your column and verify there is enough ; and ".You should have 8 columns!
here is an example of right lines :

sms;submit;"";"12345";"";"2010.04.07 00:00";"";"Tu t'en sors?"
sms;deliver;"12345";"";"";"2010.04.07 00:01";"";"oui enfin"



if your using linux edit your csv files with gedit or an other text editor that manage replacement of strings it is quicker! and better!
After half an hour of work... nothing...
First I couldn't open it
Second it can't be found
third, it finishes without succes
 
Posts: 49 | Thanked: 15 times | Joined on Jan 2010
#148
@jb900
chek there is " everywhere it should be
 
Posts: 1 | Thanked: 0 times | Joined on Apr 2010
#149
Hey guys,
Thanks alot to everybody for all the info.
Finally managed to get my messages from my N95 to the N900!

however, the imported messages (wich are older then the ones on my n900) are showing first when I open the conversation box. They should be all the up, not directly there :/


Is there any way I can move all the imported messages up in the conversation box?

Kind regards and again a big thanks to everybody
 
Helmuth's Avatar
Posts: 1,259 | Thanked: 1,341 times | Joined on Oct 2009 @ Germany
#150
Hi Djoen,

It's a known Bug. Look here: Bug #7512

Please sign up at Bugzilla and Vote for the Bug if you want it fixed. (this could took a while) - But please, no Comment is needed expect useful informations that could help to fix it.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:48.