trouble uploading plain text file that was exported from

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
jamarks
Contributor
Contributor
Posts: 5
Joined: Mon Mar 24, 2008 2:16 pm

trouble uploading plain text file that was exported from

Post by jamarks »

bookpedia.

Hello,

I've been using bookpedia for some time to export a plain text file of the books I've listed for sale on Biblio.com. I've been using tab delimited fields with line breaks for the entries for the format.

Suddenly this method stopped working, and I know I have updated to 4.4 since this time. The file appears on my mac as a plain text file. It appears to load as a plain text file in text edit and I can paste the fields in numbers exactly like one would expect. When I try to upload this file on the website however, I get a string of characters like one gets trying to load a binary in the text editor. A string of non-human readable characters. Then I'll get a note from biblio stating that I sent a unicode file.

Is it possible that this a unicode file masquerading as a text file on my mac? Has anyone had any experience with bugs in bookpedia where non-ascii characters are inserted into an otherwise plain text file?

Thank you in advance.

James
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: trouble uploading plain text file that was exported from

Post by Conor »

Depending on the data than needs to be writen the file will be UTF-8 or UTF-16. This is a Unicode format. UTF-8 will be compatible with ASCII if it contains only ASCII. It there are none ASCII characters then the reader has to be able to handle Unicode and Biblio seems not support it. Once a UTF-8 file has non-ASCII characters it is no longer true that one byte is equal to one character, there is at least one multi-byte character. To change it open the file in TextEdit that does handle UTF-8 and select the "save as" command under the file menu and use a western encoding like Latin 1 or Mac Roman for upload to Biblio. Do put in a request with Biblio for unicode UTF-8 and UTF-16 support, it has been around since 1993.
jamarks
Contributor
Contributor
Posts: 5
Joined: Mon Mar 24, 2008 2:16 pm

Re: trouble uploading plain text file that was exported from

Post by jamarks »

Thanks for your reply.

I've actually been using this method for about a year without a hitch (until recently). I'll try re-saving in text edit although the file indicates it's plain text already in inspector.

As for support for unicode. That would be nice because it makes cataloging foreign titles inaccurate. This does seem to be the industry standard though on most book selling sites. A ascii txt or csv file.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: trouble uploading plain text file that was exported from

Post by Conor »

There is always an issue with encoding, if we use the newer standards some programs or sites might not support it, if we use the older version then some characters can't be represented. We actually changed the way the file is written with the latest version 4.4.1. We previously used a function that would pick the encoding as it saw fit (Mac OS Roman most of the time or UTF-8 if needed to represent characters not in the Mac OS Roman encoding). Apple deprecated this function with Tiger for it's ambiguity and replaced it with one where you have to set the explicit encoding you want the file in. It's been 15 years since Unicode was a standard and everybody should support it. The new UTF-8 encoding is widely adopted and for ASCII fully backwards compatible, so it great all around. For the few sites or programs that are lagging behind you need to do the TextEdit conversion trick.

The file being marked as plain text is just letting you know it has no formatting (bold, italic, color, spacing...) but it can still be in a number of possible encodings. TextEdit hides these technical details, but will display the encoding in the save as panel when it asks for the "Plain Text Encoding" type to use. TextEdit will do the conversion but other programs, like the free TextWrangler, will give more prominent display to the encoding showing it in the footer of the document window.
Post Reply