Opened 10 years ago

Closed 6 years ago

#4160 closed Enhancement (fixed)

Foreign characters support

Reported by: rb07 Owned by: mike.dld
Priority: Normal Milestone: 2.90
Component: Qt Client Version: 2.22
Severity: Normal Keywords:
Cc:

Description

The following patch against revision 12283 adds foreign character support (file names and paths) to the Qt application.

The change is to use Windows' UTF-16 API by adding wrappers to low level functions and keeping everything else using UTF-8.

There's also a couple of fixes I've been carrying, the "Set Location..." fix (caused by Windows not using inodes so the function tr_is_same_file() always returned true).

I also deleted the mmap() function, in the first place Windows has an equivalent, and also it was all wrong (it didn't use the file handle or mapped the file in any other way).

The third-party/libutp and third-party/dht are trivial, I just include them for reference.

There is a bug on third-party/miniupnp which causes the application to crash (probably the 2 or 3 reports on the forum about crashes with the Windows app are caused by this), I sent the trivial change upstream and its not included since I changed to version 1.5 to see if that solved the problem (it didn't).

I've been testing the modified version (with several trunk versions) and it seems to work fine (only tested English, French, Spanish characters). I also released a binary package on SourceForge? to see if I get reports from users of any success or failure.

Attachments (3)

Transmission-r12283.diff.gz (14.0 KB) - added by rb07 10 years ago.
Patch against revision 12283.
Transmission-r12283.diff (57.8 KB) - added by jordan 10 years ago.
same diff, uncompressed
Transmission-r12426.diff (60.3 KB) - added by rb07 10 years ago.
Fixes and changes needed for newer revisions.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by rb07

Patch against revision 12283.

Changed 10 years ago by jordan

same diff, uncompressed

comment:1 follow-up: Changed 10 years ago by jordan

That is a pretty large patch :)

comment:2 Changed 10 years ago by jordan

  • Version changed from 2.22+ to 2.22

Changing version from 2.22+ to 2.22. The '+' is for new regressions that showed up between 2.22 and 2.30.

comment:3 in reply to: ↑ 1 Changed 10 years ago by rb07

Replying to jordan:

That is a pretty large patch :)

Yes, it took me a while.

The original patch had one major error, since corrected but I haven't uploaded it. I'll attach the current patch for revision 12426.

I've made this changes available with the binaries distributed through http://trqtw.sf.net/ with all the 2.30 betas, the only complaint was the error mentioned above, nothing about foreign characters (but there is not much feedback really).

The '+' is for new regressions that showed up between 2.22 and 2.30.

Its not a regression, but an enhancement. I have kept the changes with all recent revisons, which are the 2.30 betas.

Changed 10 years ago by rb07

Fixes and changes needed for newer revisions.

comment:4 Changed 10 years ago by jordan

Yes I understand that it's an enhancement, which is why I removed the '+'... The '+' is for new regressions that showed up between 2.22 and 2.30

comment:5 Changed 7 years ago by mike.dld

  • Owner changed from jordan to mike.dld
  • Status changed from new to assigned

I've taken a slightly different approach on solving foreign character issues on Windows (as part of official Windows support I'm currently working on). Current patches are available at http://mikedld.com/f/transmission/4160/ (updated constantly) and are partially based on rb07's patch. Not every case is addressed yet, but you could still try it out and talk back if something's wrong. Note that there is a todo.txt, so check it out before reporting issues.

comment:6 Changed 7 years ago by mike.dld

(GitHub mention removed, patches are back at the link above)

Last edited 7 years ago by mike.dld (previous) (diff)

comment:7 Changed 6 years ago by jordan

  • Milestone changed from None Set to 2.90
  • Resolution set to fixed
  • Status changed from assigned to closed

These are all finally, finally landed in a series of patches ending in r14338

Note: See TracTickets for help on using tickets.