S siddsg Member Licensed User Longtime User Nov 2, 2013 #1 Hello, I am facing some text formatting issues. Issue 1: I have imported data into a SQLITE db by the following procedure: 1. Entered text into an excel sheet with the formatting I wanted. 2. Covnert that into a csv. 3. Import into an existing SQLITE table. However, I see all the formatting is gone. For eg: This is the Header Line: 1. Detail Line One 2. Detail Line Two This shows up in my app as: This is the Header Line: 1. Detail Line One 2. Detail Line Two Issue 2: Apostrophe shows up as a ? in the app. For eg: - Thread's shows up as.....Thread?s Has anyone faced these issues and knows how to solve them? Thanks you! Siddharth
Hello, I am facing some text formatting issues. Issue 1: I have imported data into a SQLITE db by the following procedure: 1. Entered text into an excel sheet with the formatting I wanted. 2. Covnert that into a csv. 3. Import into an existing SQLITE table. However, I see all the formatting is gone. For eg: This is the Header Line: 1. Detail Line One 2. Detail Line Two This shows up in my app as: This is the Header Line: 1. Detail Line One 2. Detail Line Two Issue 2: Apostrophe shows up as a ? in the app. For eg: - Thread's shows up as.....Thread?s Has anyone faced these issues and knows how to solve them? Thanks you! Siddharth
Erel B4X founder Staff member Licensed User Longtime User Nov 2, 2013 #2 When you save a CSV file with Microsoft Excel it saves it in ASCII format. It doesn't support non-ASCII characters. You can open the text file with a text editor such as Notepad++ to see the saved values. Upvote 0
When you save a CSV file with Microsoft Excel it saves it in ASCII format. It doesn't support non-ASCII characters. You can open the text file with a text editor such as Notepad++ to see the saved values.
rbsoft Active Member Licensed User Longtime User Nov 2, 2013 #3 The apostrophe is used as an delimiter for text fields in SQLite. If you want to insert a value with an apostrope then you should reformat it this way, that you duplicate the apostrophe: Value: 'Threads's' should become 'Thread''s' See also here: http://www.sqlite.org/faq.html#q14 Rolf Upvote 0
The apostrophe is used as an delimiter for text fields in SQLite. If you want to insert a value with an apostrope then you should reformat it this way, that you duplicate the apostrophe: Value: 'Threads's' should become 'Thread''s' See also here: http://www.sqlite.org/faq.html#q14 Rolf
S siddsg Member Licensed User Longtime User Nov 4, 2013 #4 Thank you! The apostrophe issue got solved. Still working on the other one! Upvote 0
S siddsg Member Licensed User Longtime User Nov 13, 2013 #5 Erel said: When you save a CSV file with Microsoft Excel it saves it in ASCII format. It doesn't support non-ASCII characters. You can open the text file with a text editor such as Notepad++ to see the saved values. Click to expand... Hi Erel, Sorry for the late reply...have been toggling projects. I found that the data is importing correctly into the database....because when I do a copy from the result of the select query, it shows me with the formatting that I want. So I guess the issue is somewhere in my code. I am placing the data into a Webview by using the following line.... Code: Copy WebViewDisplay.LoadHtml(DBUtils.ExecuteHtml(SQL1, "SELECT Question FROM QueriesTable where Qry_Id = " & Query_Id, Null, 0, False)) In the Webview, the formatting is gone and everything shows in a single line. Upvote 0
Erel said: When you save a CSV file with Microsoft Excel it saves it in ASCII format. It doesn't support non-ASCII characters. You can open the text file with a text editor such as Notepad++ to see the saved values. Click to expand... Hi Erel, Sorry for the late reply...have been toggling projects. I found that the data is importing correctly into the database....because when I do a copy from the result of the select query, it shows me with the formatting that I want. So I guess the issue is somewhere in my code. I am placing the data into a Webview by using the following line.... Code: Copy WebViewDisplay.LoadHtml(DBUtils.ExecuteHtml(SQL1, "SELECT Question FROM QueriesTable where Qry_Id = " & Query_Id, Null, 0, False)) In the Webview, the formatting is gone and everything shows in a single line.
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2013 #6 Check the output of DBUtils.ExecuteHtml. Maybe some of the characters break the html. You may need to modify ExecuteHtml to escape some of the characters. Upvote 0
Check the output of DBUtils.ExecuteHtml. Maybe some of the characters break the html. You may need to modify ExecuteHtml to escape some of the characters.