defun Выбор-файла ()
(let* ((dlg (make-instance 'file-chooser-dialog
:action :open
:title "Загрузить"
:window-position :center-on-parent)))
(dialog-add-button dlg "Отмена" :cancel)
(dialog-add-button dlg "Открыть" :ok)
(set-dialog-alternative-button-order dlg (list :ok :cancel))
(setf (dialog-default-response dlg) :ok)
(g-signal-connect dlg "response"(lambda (dialog1 response-id)
(declare (ignore dialog1 response-id))
(if (= response-id '-5) (progn(Загрузка(file-chooser-filename dlg))
(object-destroy dlg))) (object-destroy dlg)))
(g-signal-connect dlg "ok" (lambda (dialog1 response-id)
(declare (ignore dialog1 response-id))
(Загрузка (file-chooser-filename dlg))
(object-destroy dlg)))
(widget-show dlg)))
Есть кусок кода всё супер работает пока не попадается файл на кириллице... вот что он пишет.
Illegal :UTF-8 character starting at position 13.
[Condition of type BABEL-ENCODINGS:INVALID-UTF8-CONTINUATION-BYTE]
Restarts:
0: [RETURN-FROM-G-CLOSURE] Return value from closure
1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "cl-gtk2 main thread" RUNNING {25237621}>)
Backtrace:
0: ((LAMBDA (BABEL-ENCODINGS::SRC BABEL-ENCODINGS::START BABEL-ENCODINGS::END BABEL-ENCODINGS::DEST BABEL-ENCODINGS::D-START)) #.(SB-SYS:INT-SAP #X02A54260) 0 33 "c:\\Lisp\\SBCL\\