Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 如何获得系统编码方式
Forum Updated to NodeBB v4.3 + New Features

如何获得系统编码方式

Scheduled Pinned Locked Moved Chinese
2 Posts 2 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    William_YY
    wrote on last edited by
    #1

    例如
    QTextCodec *codec = QTextCodec::codecForName("GBK");
    这个是获得GBK编码的QTextCodec。

    在中文系统中没问题,但是在英文系统中就很有问题。
    想根据系统的不同,使用相对应的codec,如何做?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Toxsch
      wrote on last edited by
      #2

      感觉你想找的是这个
      @QTextCodec * QTextCodec::codecForLocale() [static]@

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved