0
在Rhomobile的,這是紅寶石我有文件的解析,並保存到sqlite的分貝這樣的代碼紅寶石,Rhomobile的,JqueryMobile和單引號
Questions.delete_all()
file_name = File.join(Rho::RhoApplication::get_model_path('app','Settings'), 'questions.txt')
file = File.new(file_name)
file.each_line("\n") do |row|
col = row.split("|")
@question=Questions.create(
{"id" => col[0], "question" => col[1],"answered"=>'0',"show"=>'1',"tutorial"=>col[4]}
)
break if file.lineno > 1500
end
file.close
當在字符串文本有單引號又名「 ,例如表達
It's funny
然後解析,保存和填充後,我得到
It�s funny
任何ID如何解決這個問題,從哪裏來,從Ruby,從SQLite或從什麼?如何解決它?
嘿那裏賈裏德 - 它好像你是Rhodes/RhoMobile的開發者。我們正在考慮各種移動平臺,我很好奇你對此的看法。 – MattW