Skip to content

Conversation

@seii-saintway
Copy link

Issue #13

When typing Chinese or Japanese characters in Session Manager on Windows, the characters display as garbled text (e.g., "中文" appears as "荳ュ譁"). This issue doesn't occur on Ubuntu/Linux platforms.

Description of changes:

This PR fixes UTF-8 encoding issues that cause Chinese and Japanese characters to display as garbled text on Windows platform.

  • Replace windows.WriteFile with fmt.Fprint for consistent UTF-8 output display
  • Ensures Windows version handles UTF-8 the same way as Unix version

Problem:

  • Windows version used windows.WriteFile API for output, which doesn't handle UTF-8 properly
  • Chinese/Japanese input displayed as corrupted characters (e.g., "中文" showed as "荳ュ譁")

Solution:

  • Output fix: Replace windows.WriteFile with fmt.Fprint in sessionutil_windows.go to match Unix behavior and ensure proper UTF-8 handling

Testing:

  • Verified Chinese and Japanese characters now display correctly on Windows
  • No impact on Unix/Linux platforms (they continue to work as before)
  • Maintains backward compatibility for ASCII characters

This change aligns Windows UTF-8 handling with the Unix implementation, ensuring consistent behavior across platforms.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…atform.

- Replace windows.WriteFile with fmt.Fprint for consistent UTF-8 output display
- Ensures Windows version handles UTF-8 the same way as Unix version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant