Changeset 12095 for trunk/source/level-1


Ignore:
Timestamp:
May 20, 2009, 12:15:14 AM (10 years ago)
Author:
gb
Message:

On Windows, try to obtain the UTF-16 version of argv; change some
of the functions that deal with determining the image name and
opening the image to accept UTF-16-encoded strings. When the
kernel's done with the image name and argv, convert the strings
involved to UTF-8 (since this doesn't lose information and makes
it a little easier to bootstrap changes to the lisp side of this.)

On the lisp side of this (when obtaining the heap image name and
command-line arguments), assume that the strings are UTF-8-encoded
and possibly do platform-dependent postprocessing. (I honestly
don't know how to reliably tell what encoding was used for things
that come from the command line on other platforms; if they may
not be UTF-8, we might want to make similar changes in the kernel
to support other encodings.

This is supposed to help address ticket:475; I don't know yet if
it does, or if the kernel changes will compie on non-Windows platforms.
One way to find out ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-pathnames.lisp

    r11859 r12095  
    2525
    2626(defun heap-image-name ()
    27   (let* ((p (%null-ptr)))
     27  (let* ((p (%null-ptr))
     28         (string (%get-utf-8-cstring (%get-kernel-global-ptr 'image-name p))))
    2829    (declare (dynamic-extent p))
    29     #-windows-target
    30     (%get-cstring (%get-kernel-global-ptr 'image-name p))
    31     #+windows-target
    32      (nbackslash-to-forward-slash
    33       (%get-cstring (%get-kernel-global-ptr 'image-name p)))))
     30    #+windows-target (nbackslash-to-forward-slash string)
     31    #+darwin-target (precompose-simple-string string)
     32    #-(or windows-target darwin-target) string))
    3433
    3534(defloadvar *heap-image-name* (heap-image-name))
     
    4443         ((%null-ptr-p arg) (nreverse res))
    4544      (declare (fixnum i))
    46       (push (%get-cstring arg) res))))
     45      (push (%get-utf-8-cstring arg) res))))
    4746
    4847;These are used by make-pathname
Note: See TracChangeset for help on using the changeset viewer.