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
Some special characters are changed with asian characters #2185
Comments
It does not help... 😓 |
What is the real encoding of this file? |
Ok, sorry 😅 Info of this file: text/plain; charset=iso-8859-1 I have created with Eclipse, if this help... |
After debug.. the encoding Go detects is |
Maybe https://github.com/gogits/chardet is leaking detection for |
Woow, so good! But, it's so strange... I thought that It would be more difficult of to find the trouble 👍 |
Not sure why was not knowing the existence of this Go package, but tested with some files seems working well. Changing code now. |
Haha.... turns out Gogs is already using this package... not sure why was not using it for detection... |
hahaha, the mystery of code 👻 |
It's correct!! 👏 👍 When could you update the binary? so thanks! |
@xxxTonixxx Official ones you have to wait until next release, planned around 2015-12-18, 3rd-party one you can find on https://gobuild.io/gogits/gogs/master (wait for like 10-15mins) it is very hard to use... but it does the work sometimes... |
Ok, good info, so thanks! 😄 |
gbk编码文件, diff会乱码,检测为windows-1252编码 |
Can you reproduce on demo site? |
在 try.gogs.io 下 diff 显示为空白页,查看文件内容显示乱码 本地搭建的gogs 0.8.10.1217 diff可以显示,但是显示乱码,加入调式语句,显示检测为windows-1252编码 |
Thanks, looks like go's sub repo is broken, I'll roll back changes. |
@hho2002 things should be good now. @xxxTonixxx we need to wait more time about this issue, the go sub-repo seems is not really usable to me. |
Run into the same problem, so here are more test cases:
The test cases are relevant to my use case. I have small csv files just like the first case with very few Chinese Characters. But, as the second test case shows, there might not be enough information to tell which encoding it is. I propose a way to define what encoding should be used when a file is not utf-8. I think Gogs is normally use in small enough groups that a globe setting in app.ini should be sufficient. |
@unknwon thanks, that was exactly what I was look for. |
@0maxxam0 has funded $5.00 to this issue. See it on IssueHunt |
For example: ñ, ó, ú, é, í, !
I have uploaded a code with those errors. Maybe does it need the tag ?
The code uploaded: Code
My version of gogs is: 0.8.0.1212, the last one.
Edit:
It's so strange... Same code, same repo and different characters... (Left in line 6 and right in line 10)
Saludos! 👍
The text was updated successfully, but these errors were encountered: