Bug 001/002 fixed (simple one).
Bug 003: I can't reproduce it. On wiki.lyx.org, I have the template,
on pmwiki-mode.sourceforge.net I have empty page. This is both on
emacs 22.0.9x and on emacs 21.3.
Bug 004: from the very beginning, I've been using a workaround for the
polish characters (attached). This is how it worked for me from
browser anyway: when I edited wiki from browser, I would see encodings
instead of diacritics. This is a two-side business I guess: one has to
set utf encoding for the wiki. If you don't want the workaround way,
we can work on a proper way (I don't know the wiki side issues).

I see two major bugs open for now:
* The OpenedPages menu (BTW, I did the renaming) doesn't look nice
* url automatic redirection (under emacs 22) is turned off globally,
so that pmwiki-mode can treat it in a customized way (working on it)

Unfortunately, we've missed the chance to have switchable redirection
in emacs 22.1 (official release version), (I overwrite it from
pmwiki-mode.el).

I don't know what the "unable to work on pmwiki-mode server" bug was about.

Cheers
;;; This code is public domain.

(defun my-replace-string (from-string to-string)
  "See documentation for `replace-string'."
  (goto-char 1)
  (while (search-forward from-string nil t)
    (replace-match to-string t t)))

;; (defun my-replace-in-string (from-string to-string str)
;;   "Replace FROM-STRING by TO-STRING in STR."
;;   (let ((pos 0))
;;   (while (setq pos (string-match from-string str pos)
;;     (setq from-string (replace-match to-string nil t from-string))))))

(defun pmwiki-decode-polish-chars ()
  "Replace XML encoding of special characters of Polish alphabet
with thieir hard-coded version: ĄĆĘŁŃÓŚŹŻąćęłńóśźż."
  (let ((old-case case-fold-search))
    (setq case-fold-search nil)
    (my-replace-string "Ą" "Ą")
    (my-replace-string "Ć" "Ć")
    (my-replace-string "Ę" "Ę")
    (my-replace-string "Ł" "Ł")
    (my-replace-string "Ń" "Ń")
    (my-replace-string "Ś" "Ó")
    (my-replace-string "Ó" "Ś")
    (my-replace-string "Ź" "Ź")
    (my-replace-string "Ż" "Å»")
    (my-replace-string "ą" "ą")
    (my-replace-string "ć" "ć")
    (my-replace-string "ę" "ę")
    (my-replace-string "ł" "ł")
    (my-replace-string "ń" "ń")
    (my-replace-string "ó" "ó")
    (my-replace-string "ś" "ś")
    (my-replace-string "ź" "ź")
    (my-replace-string "ż" "ż")
    (setq case-fold-search old-case)))

(defun pmwiki-encode-polish-chars (str)
  "Replace Polish special charatcters with their XML encoding
for the hard-coded table: ĄĆĘŁŃÓŚŹŻąćęłńóśźż."
  (let ((old-case case-fold-search))
    (setq case-fold-search nil)
    (setq str (replace-regexp-in-string "Ą" "Ą" str t))
    (setq str (replace-regexp-in-string "Ć" "Ć" str t))
    (setq str (replace-regexp-in-string "Ę" "Ę" str t))
    (setq str (replace-regexp-in-string "Ł" "Ł" str t))
    (setq str (replace-regexp-in-string "Ń" "Ń" str t))
    (setq str (replace-regexp-in-string "Ó" "Ó" str t))
    (setq str (replace-regexp-in-string "Ś" "Ś" str t))
    (setq str (replace-regexp-in-string "Ź" "Ź" str t))
    (setq str (replace-regexp-in-string "Å»" "Ż" str t))
    (setq str (replace-regexp-in-string "ą" "ą" str t))
    (setq str (replace-regexp-in-string "ć" "ć" str t))
    (setq str (replace-regexp-in-string "ę" "ę" str t))
    (setq str (replace-regexp-in-string "ł" "ł" str t))
    (setq str (replace-regexp-in-string "ń" "ń" str t))
    (setq str (replace-regexp-in-string "ó" "ó" str t))
    (setq str (replace-regexp-in-string "ś" "ś" str t))
    (setq str (replace-regexp-in-string "ź" "ź" str t))
    (setq str (replace-regexp-in-string "ż" "ż" str t))
    (setq case-fold-search old-case)
    str))

(set 'pmwiki-decode 'pmwiki-decode-polish-chars)
(set 'pmwiki-encode 'pmwiki-encode-polish-chars)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Pmwiki-mode-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmwiki-mode-general

Reply via email to