Hi,

 I am displaying a set of non ascii characters which are displayed as
some junk characters. What I Do is in one activity take a set of ascii
characters  store it in Sqlite and and in other activity it is
displayed as junk characters. The set of non ascii characters i am
using are
  'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì',
'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û',
'ü', 'ý', 'þ', 'ÿ'


Another problem is Once i store this non ascii characters in database,
I have a feature to send it to another Andorid where the database will
be replaced with the new database. but when i do this the database is
getting corrupted; then happens only if it contains non ascii
characters.

The code for receiving the database is as follows

                                BufferedInputStream is = new
BufferedInputStream(socket.getInputStream());
                                FileOutputStream fos = null;
                                fos = new FileOutputStream(tempPath, true);
                                BufferedOutputStream bos = new 
BufferedOutputStream(fos);
                                int bytesRead = 0, totalBytesReceived = 0;
                                // Read the file from the socket and save it.

                                while (fileSize > 0)
                                {
                                        byte[] buffer = new byte[4096];
                                        if (fileSize >= 4096)
                                        {
                                                bytesRead = readBuffer(is, 
buffer, 4096, bos);
                                        }
                                        else
                                        {

                                                bytesRead = readBuffer(is, 
buffer, fileSize, bos);;

                                        }
                                        fileSize -= bytesRead;
                                }
                                fos.close();

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to