Foswiki on GitHub is open for business! Next release meeting: Monday October 13, 1300Z

Item11185: can't attach filenames with unicode chars in it

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine   PaulHarvey
... even though {Site}{CharSet} is set to utf-8. While Foswiki::urlEncodeAtachment() does the right thing, Foswiki::Sandbox::sanitizeAttachmentName() does not. The first checks for {UseLocale}, the latter for {Site}{CharSet} being set to utf8.

Basically, {UseLocale} and {Site}{Locale} should be removed from Foswiki.

-- MichaelDaum - 18 Oct 2011

Please don't close these unicode tasks without adding a unit test.

-- PaulHarvey - 19 Oct 2011

Your test shows that meta data returned by Meta::find() don't have the utf8 flag set while the $uniname variable correctly does have it. That's why the eq test can only error out.

All of these errors will boil down to strings entering foswiki aren't decoded properly for internal use.

The test also shows that there are a couple of "Wide character in print at" messages that indicate that strings leaving foswiki aren't properly encoded to {Site}{CharSet}

This however needs more ASSERTS() all over the place.

-- MichaelDaum - 19 Oct 2011

There's a test that fails now without distro:d8c97e533ff7, RobustnessTests::test_sanitizeAttachmentNama_unicode

-- PaulHarvey - 20 Oct 2011

Also added FuncTests::test_unicode_attachment which expects_failure() until wider Foswiki unicode issues are addressed in core

-- PaulHarvey - 20 Oct 2011

Re-opened: attachment names aren't filtering out unicode control characters

-- PaulHarvey - 02 Nov 2011
Topic revision: r33 - 17 Dec 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License