Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: opencc does not work under Windows, when opencc files in a path code page incompatible with UTF-8. #689

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

fxliang
Copy link
Contributor

@fxliang fxliang commented Aug 11, 2023

Pull request

Issue tracker

Fixes will automatically close the related issue

Fixes #

under Windows, with weasel, user_dir and shared_dir encoded in CP_ACP ( depend on code page setting ), if opencc file in those paths with NONE ASCII code (for example with simplified Chinese Windows code page CP936, user_dir with chinese characters ), it will make opencc hanged.

Feature

Describe feature of pull request

Unit test

  • Done

Manual test

  • Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

…h code page incompatible with UTF-8.

example path with Chinese characters.
Copy link
Member

@eagleoflqj eagleoflqj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested on a UTF-8 enabled Win11 and it doesn't break rime_api_console when I change t2s.json to 繁转简.json in simplifier.cc and rename the actual file.
I take your claim that it also works in cp936 win as you know better than me.

@eagleoflqj eagleoflqj merged commit 44ae945 into rime:master Aug 12, 2023
5 checks passed
groverlynn pushed a commit to groverlynn/librime that referenced this pull request Sep 27, 2023
…h code page incompatible with UTF-8. (rime#689)

example path with Chinese characters.
graphemecluster pushed a commit to TypeDuck-HK/librime that referenced this pull request Nov 2, 2023
…h code page incompatible with UTF-8. (rime#689)

example path with Chinese characters.
@fxliang fxliang deleted the opencc_path_windows branch November 3, 2023 19:12
graphemecluster pushed a commit to TypeDuck-HK/librime that referenced this pull request Nov 8, 2023
…h code page incompatible with UTF-8. (rime#689)

example path with Chinese characters.
graphemecluster pushed a commit to TypeDuck-HK/librime that referenced this pull request Mar 18, 2024
…h code page incompatible with UTF-8. (rime#689)

example path with Chinese characters.
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.

2 participants