关于github中无法正确显示的问题解决

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_38946532/article/details/79703517
问题描述:我在上github查看上传文档的时候,发现我的github网页无法正确的显示,但是我发现用其他的设备可以正常的显示。所以我估计是我的设备的问题导致了这个问题的出现。

解决办法:

hosts加入

151.101.100.133 assets-cdn.github.com
  • 1

我这边就搞定了.

如果还是不太正常 再加上这个域名的试试

151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
  • 1
  • 2

原理是:

在这个网站http://tool.chinaz.com/dns?type=1 查询你访问github 出问题的 域名

找个你访问正常的IP 修改hosts.

展开阅读全文

WriteFile写入文件后无法正确显示

03-14

BOOL CEvtLog::PopFileWrite()rnrn DWORD dwBytesWritten ;rn WORD wByteOrderMark = 0xFFFE ;rnrn WriteFile(m_oLogFile, &wByteOrderMark, 2, &dwBytesWritten, NULL) ;rn //文件为Unicode格式rn rn return TRUE ;rnrnrnvoid CEvtLog::WriteLogFile()rnrn DWORD dwBytesRead, dwBytesWritten, dwPos;rn CString sTime = "";rn wchar_t *chTime;rn char *chRet,*chBlk;rnrn CTime tTime = CTime::GetCurrentTime();rn sTime += tTime.Format("%H:%M:%S");rn rn chTime = (wchar_t *)malloc(sTime.GetLength());rn wcscpy(chTime,sTime.GetBuffer(0));rnrn chRet = (char *)malloc(4);rn chRet = "\r\n";rnrn chBlk = (char *)malloc(4);rn chBlk = " ";rn rn dwBytesRead = wcslen(chTime)*2 + strlen(chBlk) + wcslen(m_chLogMsg)*2 + strlen(chRet);rnrn dwPos = SetFilePointer(m_oLogFile, 0, NULL, FILE_END);rn LockFile(m_oLogFile, dwPos, 0, dwPos + dwBytesRead, 0);rn WriteFile(m_oLogFile, chTime, wcslen(chTime)*2, &dwBytesWritten, NULL);rn WriteFile(m_oLogFile, chBlk, strlen(chBlk), &dwBytesWritten, NULL);rnrn WriteFile(m_oLogFile, m_chLogMsg, wcslen(m_chLogMsg)*2, &dwBytesWritten, NULL);rn WriteFile(m_oLogFile, chRet, strlen(chRet), &dwBytesWritten, NULL);rn UnlockFile(m_oLogFile, dwPos, 0, dwPos + dwBytesRead, 0);rnrnrnrnm_oLogFile是我打开的一个文件,chLogMsg是我想写入的log信息,问题是现在我输入的chLogMsg是中文(操作系统是日文),然后写入.log文件,最后用notepad打开发现中文显示为一片乱码~~~~~~~~请高手帮帮看看!!rn 论坛

没有更多推荐了,返回首页