Commit Graph

4706 Commits

Author SHA1 Message Date
Alex Schroeder
d4edb159ae Use binmode to set stdout to raw when printing uploaded files.
The bug involved uploaded images not being decoded correctly.
2012-07-25 13:43:48 +02:00
Alex Schroeder
16198f8784 Filenames also need to be encoded such that the bytes are used.
Otherwise pages containing non-ASCII names cannot be read or written.
2012-07-21 11:55:45 -04:00
Alex Schroeder
03e08464bb New test to verify that bsd_glob works on dotfiles.
The question is whether bsd_glob("$PageDir/*/*.pg") will find
page/other/.emacs.pg -- and apparently it does not, so that had to be
added back in.
2012-07-21 00:58:27 +02:00
Alex Schroeder
7ca0f6172b Use bsd_glob instead of glob.
Glob will split patterns on whitespace and non-breaking spaces are now
treated as whitespace.
2012-07-21 00:40:42 +02:00
Alex Schroeder
276c1c2076 Handle namespaces containing a non-breaking space.
Since the non-breaking space is now recognized as a whitespace
character, the behaviour of the glob function has changed. Use
bsd_glob instead!
2012-07-20 02:14:36 +02:00
Alex Schroeder
9c996cee04 No longer call oddtrans when modules are changed because of encoding errors introduced. 2012-07-19 09:07:59 -04:00
Alex Schroeder
6c813b8297 $q->path_info lacks UTF-8 decoding.
Fix other encoding issues with namespaces.
2012-07-19 09:05:07 -04:00
Alex Schroeder
ec4cba6fb3 Move binmode calls to the top of the file. 2012-07-19 08:28:51 -04:00
Alex Schroeder
76c50674f5 Handle encoding and avoid "wide character in print" when running oddtrans." 2012-07-19 08:06:41 -04:00
Alex Schroeder
a73a9e4a96 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-07-19 14:01:04 +02:00
Alex Schroeder
f27ec6c142 Use utf8::encode when creating a directory.
There is no way to provide an encoding layer to directory names.
Therefore they need to be raw bytes and not characters. This becomes
apparent when creating namespaces containing non-ASCII characters.
2012-07-19 13:58:58 +02:00
Alex Schroeder
37c32783f3 Changed \x{ffff} to \x{fffd} in all regular expressions.
Using Perl 5.8.8 resulted in a crash when compiling regular expressions referring to \x{ffff}.
2012-07-19 06:01:30 -04:00
Alex Schroeder
f922c0ae9a Fixed encoding of brazilian-portuguese-utf8.pl.
Some left-over texts for bulgarian-utf8.pl and chinese-utf8.pl.
2012-07-19 05:42:03 -04:00
Alex Schroeder
b46fcb3c90 Merge branch 'master' of ssh://as@git.sv.gnu.org/srv/git/oddmuse 2012-07-19 05:29:19 -04:00
Alex Schroeder
b885287ea2 Use binmode utf8 when sending files. 2012-07-19 10:53:13 +02:00
Alex Schroeder
67d68a370a Merge branch 'master' of ssh://as@git.sv.gnu.org/srv/git/oddmuse
Conflicts:

	Makefile
2012-07-19 04:49:13 -04:00
Alex Schroeder
ccef879ac1 Added "prepare" target to Makefile to add version info to all the sources.
.gitignore added build directory and stuff created by the Mac disk image rules.
2012-07-18 18:34:57 +02:00
Alex Schroeder
e8b9708f40 Set $ModulesDescription to an appropriate link for all translation files. 2012-07-18 18:16:57 +02:00
Alex Schroeder
d4f1e27cae Add a space to the META HTTP-EQUIV tag. Add an encoding test. 2012-07-18 10:59:58 +02:00
Alex Schroeder
b0a8e49975 Add link to documentation for %Smilies. 2012-07-18 10:58:58 +02:00
Alex Schroeder
9383adcba5 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-07-06 15:40:36 +02:00
Alex Schroeder
cde2d41dd1 Worked on encoding errors in PageHtml
I was getting "wide character in print" warnings when printing the RSS feed.
This should fix it.
2012-07-06 15:39:27 +02:00
Alex Schroeder
6e5766f431 On some encoding problems
The TOC extension causes problems when including non-ASCII Text.
2012-07-04 21:36:56 +02:00
Alex Schroeder
a2fe639a57 Removed statement that had no effect but caused an error when opening a non-ASCII page
The page in question was "Übersicht" on Emacs Wiki.
2012-07-04 17:14:51 +02:00
Alex Schroeder
f452d99e2f Removed $VERSION 2012-07-04 16:45:12 +02:00
Alex Schroeder
49f0c6d200 duplicate use utf8 removed 2012-07-04 16:43:12 +02:00
Alex Schroeder
f9efba3976 use utf8; 2012-07-04 15:26:08 +02:00
Alex Schroeder
36ef964d0d Removed $Id$ in wiki.pl because it was no longer being updated. 2012-07-04 11:30:21 +02:00
Alex Schroeder
eb4a4653a2 Support "half" class, eg. [[image/half/center:...]] 2012-06-27 16:52:07 +02:00
Alex Schroeder
741601489f Fix cookie encoding issues
If the username was set to Schröder, the wiki would keep reporting the
username as changed. This was caused by encoding errors if cookie
values. This change also allows non-ASCII parameters to be stored in
the cookie.
2.1
2012-06-23 01:08:46 +02:00
Alex Schroeder
217055fab2 Pod fix.
Changed =head to =head2 as suggested by anonymous visitor to the wiki.
2012-06-22 18:23:51 +02:00
Alex Schroeder
8f68442db1 Fix UTF-8 decoding issue when using toc.pl
The output of ApplyRules is no explicitly decoded as UTF8.
2012-06-22 02:54:29 +02:00
Alex Schroeder
b9d0c60080 Added copyright year. 2012-06-14 10:21:40 +02:00
Alex Schroeder
2b2e45b952 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-06-14 10:20:17 +02:00
Alex Schroeder
dfc3555184 Merge branch 'add-thumbs' 2012-06-14 10:19:33 +02:00
Alex Schroeder
474798c5cd Handle the new file format for uploaded files
Recently, uploaded files don't just contain #FILE and a MIME type --
the MIME type is followed by a space and optionally more information.
I replaced the hand-coded parsing with a call to TextIsFile and added
better error checking and fixed the error messages (they used $s
instead of %s).
2012-06-14 10:04:54 +02:00
Alex Schroeder
0a54f14a6f From the wiki
Taken the version from the wiki and added the standard
$ModulesDescription.
2012-06-14 08:39:25 +02:00
Alex Schroeder
04cdf0be24 Fixed cookie decoding
If the username contained a non-ASCII character, eg. Schröder, then
the script would keep printing the cookie message, telling the user
that the cookie had changed when in fact it had not.
2012-05-25 17:41:01 +02:00
Alex Schroeder
e531f9d569 Encoding the cookie and fixing drafts.pl
Drafts are saved using the username as filename. This must also be
encoded and decoded correctly. Because of NFC and NFD issues on Mac
HFS, an appropriate normalization was added to mac.pl.

As the username is also part of the cookie, this showed that the
Cookie content wasn't being encoded correctly, so that was fixed, too.
2012-05-25 11:56:46 +02:00
Alex Schroeder
4f6407fd38 Resolved conflict. 2012-05-25 08:29:34 +02:00
Alex Schroeder
3174e184f9 Fix an encoding error in namespaces.pl on Debian
The Debian installation uses ext3 and therefore raw bytes for
filenames unlike the HFS filesystem of Mac OSX.

Copyright years were updated. The maintenance output of for drafts was
cleaned up.
2012-05-25 01:00:10 +02:00
Alex Schroeder
8d94a0a50f Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse
Conflicts:
	modules/mac.pl
	t/encoding.t
	wiki.pl
2012-05-24 18:31:44 +02:00
Alex Schroeder
67650e3dc8 More UTF-8 fixes
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).

The mac compatibility extension will also disable the use of grep if
non-ASCII characters are searched for because of an unexplained
problem with grep.
2012-05-24 18:08:42 +02:00
Alex Schroeder
700d412a01 More UTF-8 fixes
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).

The mac compatibility extension will also disable the use of grep,
because I could not get it to work (and I don't think there will be
large Oddmuse installations running on Apple's HFS).
2012-05-24 16:58:10 +02:00
Alex Schroeder
cd2b4d624e Remove $HttpCharset and moved everything to UTF-8
This also required some changes to the tests where explicit UTF-8
encoding had been used in the past.
2012-05-22 11:50:23 +02:00
Alex Schroeder
fdde88c98f Provide a default class for the RecentChanges form
The XHTML is invalid because the tag ends with ... class> -- this is
caused by an assignment without value. Fix: Provide a class attribute
to the form in RcHtml. Provide a default class attribute to the form
in GetFormStart.
2.0.1
2012-05-21 17:32:36 +02:00
Alex Schroeder
f6c18b2ccd no borders for a img 2012-05-21 11:43:53 +02:00
Alex Schroeder
a7d9995db9 Google +1 link without border 2012-05-20 01:43:48 +02:00
Alex Schroeder
8d39c095ff Google +1 button uses id, not class 2012-05-18 10:32:05 +02:00
Alex Schroeder
cdecbef49a Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-05-18 10:29:25 +02:00