• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5133: Can't save multibyte char names

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine I18N Normal Confirmed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Attach a file with multibyte names (such as 中文.jpg) as listed in this screenshot:

filenames.png

This produces the following error

Use of uninitialized value in hash element at (eval 98) line 3.
 at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 84
   TWiki::UI::__ANON__('Use of uninitialized value in hash element at (eval 98) line 3.\x{a}') called at (eval 98) line 3
   CGI::tmpFileName('CGI=HASH(0x8c84e3c)', '\x{ff}\x{d8}\x{ff}\x{e0}\x{0}\x{10}JFIF\x{0}\x{1}\x{1}\x{1}\x{0}`\x{0}`\x{0}\x{0}\x{ff}\x{db}\x{0}C\x{0}\x{8}\x{6}\x{6}\x{7}\x{6}\x{5}\x{8}\x{7}\x{7}\x{7}\x{9}\x{9}\x{8}\x{a}\x{c}\x{14}\x{d}\x{c}\x{b}\x{b}\x{c}\x{19}\x{12}\x{13}\x{f}\x{14}\x{1d}\x{1a}\x{1f}\x{1e}\x{1d}\x{1a}\x{1c}\x{1c} $...') called at /home/twiki4/twikisvn/lib/TWiki/UI/Upload.pm line 193
   TWiki::UI::Upload::upload('TWiki=HASH(0x8c9b7f0)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 159
   TWiki::UI::__ANON__() called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 379
   eval {...} called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 371
   Error::subs::try('CODE(0x8c84d40)', 'HASH(0xb7b77d98)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 197
   TWiki::UI::run('CODE(0x8e80194)') called

Reported by Dai Luogeng. I could reproduce it here in the LitterTray web. Due to chicken and egg problem I can't attach the file here for others to reproduce the issue.

-- TWiki:Main/PeterThoeny - 14 Dec 2007

If it is possible to zip the file into a non-multibyte filename that might be a workaround for the upload.

-- TWiki:Main.SteffenPoulsen - 15 Dec 2007

That is the same stack dump as for Item5130; it may be nothing to do with multibyte.....

CC

I fixed Item5130; it may or may not have cured this issue. Peter, since you can reproduce this problem, could you check please?

CC

I just tried it here on this topic. No luck:

Use of uninitialized value in hash element at (eval 98) line 3.
 at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 84
   TWiki::UI::__ANON__('Use of uninitialized value in hash element at (eval 98) line 3.\x{a}') called at (eval 98) line 3
   CGI::tmpFileName('CGI=HASH(0x8c28e3c)', '\x{ff}\x{d8}\x{ff}\x{e0}\x{0}\x{10}JFIF\x{0}\x{1}\x{1}\x{1}\x{0}`\x{0}`\x{0}\x{0}\x{ff}\x{db}\x{0}C\x{0}\x{8}\x{6}\x{6}\x{7}\x{6}\x{5}\x{8}\x{7}\x{7}\x{7}\x{9}\x{9}\x{8}\x{a}\x{c}\x{14}\x{d}\x{c}\x{b}\x{b}\x{c}\x{19}\x{12}\x{13}\x{f}\x{14}\x{1d}\x{1a}\x{1f}\x{1e}\x{1d}\x{1a}\x{1c}\x{1c} $...') called at /home/twiki4/twikisvn/lib/TWiki/UI/Upload.pm line 193
   TWiki::UI::Upload::upload('TWiki=HASH(0x8c3f7a0)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 159
   TWiki::UI::__ANON__() called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 379
   eval {...} called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 371
   Error::subs::try('CODE(0x8c28d40)', 'HASH(0xb7ad4110)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 197
   TWiki::UI::run('CODE(0x8e240dc)') called

-- TWiki:Main.PeterThoeny - 15 Dec 2007

erm, that shouldn't be possible. I put a try..catch around the call to tmpFileName, so the exception should have been caught. Therefore the code you tried it on was not the code I checked in.

Later: probably due to my doing other things on d.t.o, the svn update had failed after my checkin so you were testing the wrong code. Note that I didn't fix it. The multibyte filename won't work (looks like it's a limitation in CGI) but at least it shouldn't crash.

Yet another UTF-8 lmitation frown

CC

Topic was corrupted due to UTF8 problems. Restored from old rev. Kenneth, in answer to your question my fix was checked in and merged to 04x02 in Item5130. However it is just a patch over the symptom. The real problem has not been fixed yet.

ItemTemplate
Summary Can't save multibyte char names
ReportedBy TWiki:Main.PeterThoeny
Codebase ~twiki4
SVN Range TWiki-4.3.0, Sun, 25 Nov 2007, build 15790
AppliesTo Engine
Component I18N
Priority Normal
CurrentState Confirmed
WaitingFor

Checkins TWikirev:16002 TWikirev:16001
TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng filenames.png r1 manage 16.8 K 2007-12-14 - 19:15 PeterThoeny  
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r11 - 2008-05-04 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback