Thank you very much.

1) I am not explicitly setting any unicode character code in the
TextView. I display data that exists within e-books that are stored in
epub format. I do not alter this data at all. I display it as is. Most
of this displays OK, but quotes look like the following garbage ...

2) Open double quote:   a-circumflex
                        something similar to a Euro symbol
                        a scrunched together o-e

   Close double quote:  a-circumflex
                        something similar to a Euro symbol
                        question mark in a black diamond

3) I do not get the contents over the network. These are e-books in
epub format that already reside on my sdcard. The mojibake is rendered
perfectly (i.e., not as mojibake) by other e-readers such as Laputa,
Aldiko, FBReader, Laputa, Nook, Kindle, etc.

This is the code that reads the data from the epub file.

    // this.file is a String which contains the pathname to the
    // e-book on my sdcard.

    // this.itemMap is a LinkedHashMap which holds the contents
    // of each item in the e-book, keyed by the name of the item.
    // It's initialized to null and instantiated via lazy
    // evaluation.

    // More extensive error handling will be added later.

    private boolean readEpubFile() {
        FileInputStream f = null;
        ZipInputStream  z = null;
        try {
            f = new FileInputStream(this.file);
            z = new ZipInputStream(f);
            ZipEntry ze;
            while ((ze = z.getNextEntry()) != null) {
                StringBuilder sb = new StringBuilder();
                for (int c = z.read(); c >= 0; c = z.read()) {
                    sb.append((char) c);
                }
                String name = ze.getName();
                if (this.itemMap == null) {
                    this.itemMap = new LinkedHashMap<String,
String>();
                }
                this.itemMap.put(name, sb.toString());
            }
        }
        catch (Throwable t) {
            return (false);
        }
        finally {
            try {
                z.close();
            }
            catch (Throwable t) {
            }
            try {
                f.close();
            }
            catch (Throwable t) {
            }
        }
        return (true);
    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to