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

Unbaking Japanese #119

Open
wimglenn opened this issue Jan 17, 2019 · 3 comments
Open

Unbaking Japanese #119

wimglenn opened this issue Jan 17, 2019 · 3 comments

Comments

@wimglenn
Copy link

wimglenn commented Jan 17, 2019

>>> import ftfy
>>> s = "Ä×èÈÄÄî▒è¤ô_üiâAâjâüâpâXüj_10òb.png"
>>> ftfy.ftfy(s)
'Ä×èÈÄÄî▒è¤ô_üiâAâjâüâpâXüj_10òb.png'
>>> s.encode('cp850').decode('shift-jis')
'時間試験観点(アニメパス)_10秒.png'

Possible? Thanks

@rspeer
Copy link
Owner

rspeer commented Feb 12, 2019

Neither Shift-JIS nor codepage 850 are encodings that ftfy currently tries.

I can see the reason to want to support Shift-JIS; it's pretty much the reason for the word "mojibake", after all. It's something I want to support but I haven't found a good heuristic for distinguishing it from EUC-JP. It even coincidentally sometimes looks like UTF-8.

@rspeer
Copy link
Owner

rspeer commented Nov 8, 2024

This is something I want to make another attempt at. I think that understanding the nuances of Shift-JIS mojibake is going to require talking to someone who spends a lot of time on the Japanese-language Internet though

@wimglenn
Copy link
Author

wimglenn commented Nov 8, 2024

Good luck. I am not that person. I nominate @bobince.

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

No branches or pull requests

2 participants