Skip to content

File transfer: support of Unicode and extended-length path #332

@jonathanpoelen

Description

@jonathanpoelen

Currently, uvnc uses what I believe to be the native code page, which is an 8-bit character set and therefore extremely limited (for example, CP1252). Since Windows 10, many Windows APIs support an extended path length of up to 32,767 characters, including null.

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

Current problem:

  • If a file name contains a character that cannot be represented in the code page used, it is replaced by ? or ?? when displayed (🚀 is 4 bytes in utf16, so 2 characters in 8-bit encoding).
  • Since ? is a prohibited character in a path name, it is not possible to transfer the file. In any case, the file will probably not be found.
  • Navigating to a folder with a name that is too long results in an error. In fact, without special configuration, this is also the case with the file explorer. In addition, the limit for a folder name is smaller than MAX_PATH (247). So I haven't really tested this case.

Metadata

Metadata

Assignees

Labels

characterCharacter relatedfiletransferFileTransfer relatedrudiRudi answer is neededserverUltraVNC Server relatedviewerUltraVNC Viewer related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions