importing Chinese characters into sqlite database - character-encoding

how do i import chinese text into an sqlite database?
I have used Google translate to generate all my android applications text, then saved in open office calc csv file.
the csv file shows all the chinese characters correctly
when i come to import this data i end up with ? instead of the chinese characters. I've tried using Sqlite database browser 2.0, sqlite adim, and sqlite manager. I still cannot import the complete text as i see them displayed in Google Translate.
what sqlite tool/utility and character set combination actually works and imports all chinese characters without ? appearing?

Related

CSV file appearing in tabular form in iOS 11

I am a newbie in iOS. My application has option to download data from database into Excel or CSV format. The Excel option is working fine but when I select the "Download in CSV Format" option, it is downloading the data and displaying it in a tabular format, much similar to excel.
I checked in the browser of the device and there also the CSV file is shown in tabular format.
I would like to know, is this a feature in iOS 11, to display CSV in table format, rather than the normal single-line form in older versions?

How to do a directory wide search for Chinese characters in a text editor?

I have Atom and Sublime and I'm working with a series of documents with some Chinese comments. It seems that both text editor decodes the characters before displaying (happens in a fraction of a second when opening each file where you can see it turn from gibberish into Chinese). After those files are opened, I am able to include them in my directory wide search.
However, without opening any of these documents, I am unable to search at them.
I'm resorting to opening hundreds of tabs currently to work, which is highly inefficient.
I'm guessing both editors are waiting until each file is opened before processing it. How do I ensure that all files in my Project is decoded as Chinese in the background?
I'm opened to using other text editors.

xlsx to plist in Spanish - accented characters being lost

I have been using "Plist Converter" to get my data from csv files (excel spreadsheets saved as csv files) into plists up to now and have never had any issues with it.
However, I am currently working on an app where the data I need to convert is in Spanish.
The conversion obviously still works but I lose all of the accented characters during the process. It looks like maybe some are just lost, some are changed to other accents/characters, and the majority are replaced with an upside down question mark that does not appear on the screen but I can see it in the source code.
Anyone help me get around this with plist converter, or recommend another utility?
iMac, Excel for mac, plist converter, xcode... that is what I'm using.
Thanks
Look at libxls on SouceForge - it comes with a utility to take a .xls file and create a .csv one that you can further process using command line tools. But it has no support for .xlsx.

Export data to XLS (not via CSV) on iOS

I need to export some data to an .XLS file, pdf, and print.
I already tried the simple solution: exporting it to .CSV with CHCSVWriter. It works for printing and saving it to pdf (I open the CSV in a UIWebView and get the PDF or print from there). However, to use the CSV to be open in excel has two main problems:
1 - First, as the name says, in the CSV the values are separated by commas, and in some versions of Excel, it requires the user to separate 'manually' in cells.
2 - I have hebrew characters, and I already tried all the string encodings, and can't have both hebrew and latin characters.
So, after giving up after days of trying to use CSV to solve the issues above, I gave up. How can I export my data to XLS?
The LibXL library provides this functionality for both xls and xlsx formats. There is no iOS version, but people say the iOS version is coming. You may want to contact LibXL support to confirm this.
EDIT:
The iOS version is available now.
This article explains how to programmatically create an Excel (.xls) file without using any external library. It just opens a file stream and it writes XML contents straight to it.
It is written in C#, but the core information coming out of it is the XML formatting used to create nodes and fill attributes for corresponding cell values and formatting.
Please consider I have not tried this myself, I found it while doing a search. Please feel free to ask if some C# bits are not clear. HTH

Grabbying text from various document formats in Ruby on Rails

I'm new to Rails but am developing a web app that requires taking text from a large database of text files and displaying the text in html. The files are in .doc, .docx, .wps, and .pages, and are currently just sitting on a hardrive. There are a small enough number of files in .wps and .pages that I could convert these to .doc manually, but the question remains: how do I get to the text inside a .doc or .docx file so that I can save it into a sqlite database for later use?
Thanks!
Take a look at Yomu. It's a gem which acts as a wrapper for Apache TIKA and it supports a variety of document formats which includes the following:
Microsoft Office OLE 2 and Office Open XML Formats (.doc, .docx, .xls, .xlsx, .ppt, .pptx)
OpenOffice.org OpenDocument Formats (.odt, .ods, .odp)
Apple iWorks Formats
Rich Text Format (.rtf)
Portable Document Format (.pdf)
It's a long roundabout way, but open office can convert files, and there are programmatic ways to do that: http://railstech.com/2010/08/convert-open-office-document-to-another-open-office-format/
That may not be the best way yet, but maybe it will grease the wheels a bit.

Resources