[GH-ISSUE #67] SetCurrentDirectory() fails with "ñ" in Windows 10 #37

Closed
opened 2026-05-05 03:35:38 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @izabala123 on GitHub (Mar 17, 2022).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/67

It seems to work using ToSystemCharset().
It may be included in U++ implementation of SetCurrentDirectory().
Other functions like GetCurrentDirectory() already include FromSystemCharsetW().

// Test case
String folderName = "c:\\Demo ñ";
bool ret;
ret = SetCurrentDirectory(folderName);			// Returns false
ret = SetCurrentDirectory(ToSystemCharset(folderName));	// Returns true
Originally created by @izabala123 on GitHub (Mar 17, 2022). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/67 It seems to work using ToSystemCharset(). It may be included in U++ implementation of SetCurrentDirectory(). Other functions like GetCurrentDirectory() already include FromSystemCharsetW(). ``` // Test case String folderName = "c:\\Demo ñ"; bool ret; ret = SetCurrentDirectory(folderName); // Returns false ret = SetCurrentDirectory(ToSystemCharset(folderName)); // Returns true ````
Author
Owner

@mirek-fidler commented on GitHub (Mar 17, 2022):

I cannot use SetCurrentDirectory here as that is Win32 API function (which years ago I have created trivial implementation for POSIX).

I have added ChangeCurrentDirectory....

<!-- gh-comment-id:1070800243 --> @mirek-fidler commented on GitHub (Mar 17, 2022): I cannot use SetCurrentDirectory here as that is Win32 API function (which years ago I have created trivial implementation for POSIX). I have added ChangeCurrentDirectory....
Author
Owner

@izabala123 commented on GitHub (Mar 17, 2022):

I understand. It is right.
However, for compatibility please make the ChangeCurrentDirectory() accessible on both Windows and Linux, being this function the one we would document in U++.

<!-- gh-comment-id:1070958937 --> @izabala123 commented on GitHub (Mar 17, 2022): I understand. It is right. However, for compatibility please make the ChangeCurrentDirectory() accessible on both Windows and Linux, being this function the one we would document in U++.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#37
No description provided.