Giter VIP home page Giter VIP logo

Comments (12)

XChinux avatar XChinux commented on August 20, 2024

理论上想兼容三大桌面,但实际上目前参与者中没有MacOS X开发者。关于BOM/Utf-8,真心msvc/gcc不统一

from tianchi.

mahiuchun avatar mahiuchun commented on August 20, 2024

「关于BOM/Utf-8,真心msvc/gcc不统一」,能解釋下嗎?編譯器層面肯定都支持帶BOM的UTF-8,主要的困難應該是Win32 API要麼ANSI要麼UTF-16 LE(微軟所謂的Unicode),但是在Qt的宇宙中UTF-8的支持應該沒問題啊。

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

可查看qtcn.org中Qt中文处理版块的内容。

from tianchi.

mahiuchun avatar mahiuchun commented on August 20, 2024

看一個別人的實測結果:
http://www.cnblogs.com/zyl910/archive/2012/07/26/cfile_utf8.html

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

那篇文章中怎么没测Qt4历史上使用最广泛的编译器之一msvc2008呢

from tianchi.

mahiuchun avatar mahiuchun commented on August 20, 2024

「Qt4历史上使用最广泛的编译器」請問您怎麼統計的「历史」?現在最新的VC是2008嗎?最新的Qt是4系列嗎?

其實VC2008的情況應該和VC2005類似啊,源碼可以是UTF-8 with BOM,但是運行時會強制轉換成ANSI(在簡體中文環境顯然就是GBK),其實這樣和你直接保存成GBK在運行時的效果一樣啊。反而只是break了不作這種強制轉換的VC2003,對於高版本VC和GCC,本來你就可以指定運行時編碼啊。等到VC2005/2008淡出了,就可以純用UTF-8了。

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

兄台有什么好的方法吗,目前要万全似乎只有去除全部中文及中文注释了。不再兼容Qt4的话,肯定全用Utf-8了。

from tianchi.

mahiuchun avatar mahiuchun commented on August 20, 2024

註釋也有影響?

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

源码中的中文很少量,倒是可以通过另外的方法避免,主要是jonix写的两个文件有这个问题。中文注释这是最根本的,也影响编译。

from tianchi.

slug404 avatar slug404 commented on August 20, 2024

我自己积累了很多Qt的库,也议过用UTF8进行编码.没有人理一点兴趣都没有了

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

只要解决了几个编译器的兼容性问题就可以,楼上的有什么好办法吗?

from tianchi.

XChinux avatar XChinux commented on August 20, 2024

目前这种代码保存为GBK的方式,我从2008年到现在使用得都正常。将源代码由UTF-8改为GBK,就是因为msvc2008的问题.

from tianchi.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.