33e80849a8
Finally we can add a file to the file list once we have got its local file name decoded. The interesting part here is what we use for the remote name. Suppose the user has selected two files in different directories. In this case we end up receiving a text/uri-list like this: file:///home/bob/foo/a file:///home/bob/bar/b We'd expect to see "a" and "b" pasted into the remote session, so that's what we should use for the remote names: the base names of the files. These are the parts from the end up to the last directory delimiter. One tricky point here is that Windows expects the file names to be encoded in Unicode, but POSIX does not specify any particular encoding for file names. Operating systems and file systems generally handle the file names as mostly opaque bytes strings and do not really care what encoding is used there. There is no portable API to get the encoding, it's entirely up to the users and the software they use to correctly interpret the file names. But we need to do something here. As of 2017, the most widely used encoding for file names is UTF-8. While there are marginal communities which stick to codepages for legacy reasons, we can safely assume that most of the time the file names will be encoded in UTF-8. In fact, popular desktop environments like GNOME also assume this. So that's what we will do here as well. |
||
---|---|---|
channels | ||
ci/cmake-preloads | ||
client | ||
cmake | ||
docs | ||
external | ||
include | ||
libfreerdp | ||
packaging | ||
rdtk | ||
resources | ||
scripts | ||
server | ||
third-party | ||
uwac | ||
winpr | ||
.gitignore | ||
buildflags.h.in | ||
ChangeLog | ||
CMakeCPack.cmake | ||
CMakeCPackOptions.cmake.in | ||
CMakeLists.txt | ||
config.h.in | ||
LICENSE | ||
README |
FreeRDP: A Remote Desktop Protocol Implementation ================================================= FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience. Resources --------- Project website: http://www.freerdp.com/ Issue tracker: https://github.com/FreeRDP/FreeRDP/issues Sources: https://github.com/FreeRDP/FreeRDP/ Wiki: https://github.com/FreeRDP/FreeRDP/wiki Downloads and other resources: http://pub.freerdp.com API doc: http://pub.freerdp.com/api/ IRC channel: #freerdp @ irc.freenode.net Mailing list: https://lists.sourceforge.net/lists/listinfo/freerdp-devel Microsoft Open Specifications ----------------------------- Information regarding the Microsoft Open Specifications can be found at: http://www.microsoft.com/openspecifications/ A list of reference documentation is maintained here: https://github.com/FreeRDP/FreeRDP/wiki/Reference-Documentation Compilation ----------- Instructions on how to get started compiling FreeRDP can be found on the wiki: https://github.com/FreeRDP/FreeRDP/wiki/Compilation