Sky Explorer Supports Unicode Filename

Unicode filename and path are supported in version 1.0.3

The symbian python os functions can accept utf8 string and will also return utf8 string (eg. in os.listdir). It does not use unicode string like in other native symbian functions.

Since the Sky Explorer code uses path.join to get the full path in a lot of places, I modified path.join to always return in utf8 string regardless of its input. In places that use python os functions, no other changes are needed to allow for unicode filename and path. In places that use native symbian functions which expect unicode string, a conversion from utf8 string to unicode string is needed. — unicode(fname, ‘utf8′)

(in dir_util.py)
# this replaces os.path.join (encode p in utf8)
os_path_join = path.join
def path_join(a, *p):
    return os_path_join((a and type(a) is unicode) and a.encode('utf8') or a,
        *[(type(d) is unicode) and d.encode('utf8') or d for d in p])
if path.join is not path_join:
    path.join = path_join

It will now support searching for unicode filename and can also search for unicode text in utf16 files.
Zip and unzip can support unicode filename and path, this is done by encoding the unicode filename in utf8. Though if you unzip such a zip file in windows OS, the filename and path will remain in utf8 string.

Unicode sms is supported using
messaging.sms_send(to, msg, ‘UCS2′)

Application tagging in unicode is also saved and restored correctly in the new version.

(The source codes are released in http://skyexplorer.googlecode.com/svn/trunk/ )

Feb 12, Download from http://skyexplorer.googlecode.com/svn/trunk/sis/skyexplorer_2ndEd_1.0.3.sis
or
http://skyexplorer.googlecode.com/files/skyexplorer_2ndEd_1.0.3.sis. (We’re sorry page)


One Comment

  1. sky
    Posted February 12, 2008 at 11:27 pm | Permalink

    Google doesn’t allow me to download the .sis files that I have uploaded for Sky Explorer on the Google code site.

    When I click to download, it gives

    Google
     Error  

    We’re sorry…

    … but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can’t process your request right now.

    We’ll restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected, you might want to run a virus checker or spyware remover to make sure that your systems are free of viruses and other spurious software.

    We apologize for the inconvenience, and hope we’ll see you again on Google.

Post a Comment

Your email is never shared. Required fields are marked *

*
*