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