Text export, UTF-16

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
cswingle
Contributor
Contributor
Posts: 6
Joined: Thu Dec 14, 2006 2:19 pm

Text export, UTF-16

Post by cswingle »

Greetings!

As mentioned in my last bonehead post, I'm a new Bookpedia user. I created a new export template that basically just dumps every available field from the database (I'm planning on writing a dump -> MySQL program eventually) to a text file. When I use it, it exports with UTF-16 encoding. That's a pain for me to work with in my text editor (vim), so each time I export I have to open it in TextEdit (which, conveniently, happens automatically right now) and save the file as UTF-8.

Any hints about why it's choosing UTF-16, and how I can make it use UTF-8? If it is possible to always use UTF-8, how do I tell Bookpedia not to open TextEdit when it's finished exporting?

Thanks,

Chris Swingley
Fairbanks Alaska
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

The encoding of the file is left up to Apple and it tends to suggest Western Mac OS Roman, but otherwise it chooses UTF-16 if necessary. In the 3.3.1 version of Bookpedia, which you can download now, place UTF8 anywhere in the name of your template and it will write out the file in UTF-8 encoding; e.i. MyTemplateUTF8.txt. Also you will be able to hold down option when you click on the "Save" button for the export and it won't preview the results. (It previews in your default .txt viewer, change that with get info in the finder or change the ending of your template to another extension like .sql to preview in different programs.)
cswingle
Contributor
Contributor
Posts: 6
Joined: Thu Dec 14, 2006 2:19 pm

Thanks!

Post by cswingle »

Conor,

Thanks for the fast response, and for fixing the problem! Excellent!

Cheers,

Chris Swingley
Fairbanks Alaska
Post Reply