bug with attachment filenames in utf-8 (russian) - windows

Forum for misc bugs and other questions. If it doesn't seem to work properly or if you have any questions, post them here. Do not post questions regarding nightly builds here.

bug with attachment filenames in utf-8 (russian) - windows

Postby amarao » 29th Mar 2008 11:29

When attachment (in recived mail or from local filesystem) have name in uft-8 enconig with twobytes symbols (f.e. russian), it passing to gpg in bad encoding. It looks like:


enigmail> C:\Program Files\GNU\GnuPG\gpg.exe --charset utf8 --batch --no-tty --status-fd 2 -e -s --trust-model always --encrypt-to 0x20FF56A1 -r 0x2F7B592720FF56A1 -u 0x20FF56A1 --passphrase-fd 0 --no-use-agent --yes -o 'somefile encfile-1'
gpg: 'somefile': No such file or directory

.....doc in reality is a simple russian name, like "Годовой отчёт.doc"

thunderbird works with those files without problems.
amarao
New user
New user
 
Posts: 2
Joined: 28th Mar 2008 22:07

Postby patrick » 31st Mar 2008 07:12

That's a known problem, see bug 9420. Unfortunately I don't have a UTF-8 Windows, so I can't reproduce the bug.
User avatar
patrick
Developer
Developer
 
Posts: 517
Joined: 13th Nov 2005 22:16
Location: Zurich, Switzerland

Postby amarao » 31st Mar 2008 08:39

I'm currently hacking a js.

Following lines helps to send attached files with russian names:

components\enigmail.js, Enigmail.prototype.encryptAttachment =
function:

Code: Select all

  inFile = inFile.replace(/([\\\"\'\`])/g, "\\$1");
  outFile = outFile.replace(/([\\\"\'\`])/g, "\\$1");

   var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
   converter.charset = "Windows-1251";
             inFile_converted = converter.ConvertFromUnicode (inFile);
   outFile_converted = converter.ConvertFromUnicode (outFile);
   inFile=inFile_converted;
   outFile=outFile_converted;

  gpgCommand += " --yes -o " + this.quoteSign + outFile + this.quoteSign;
  gpgCommand += " "+this.quoteSign + inFile + this.quoteSign;


currenly i'm working on decoding (but I lame in java script - inName outName must be converted to current locale).
amarao
New user
New user
 
Posts: 2
Joined: 28th Mar 2008 22:07


Return to General Discussions