资源简介
全志源码包中附带的qtdemo源码,适用于linux、android
代码片段和文件信息
#include “unicodeandutf8.h“
int enc_get_utf8_size(const unsigned char pInput)
{
unsigned char c = pInput;
if(c< 0x80) return 0;
if(c>=0x80 && c<0xC0) return -1;
if(c>=0xC0 && c<0xE0) return 2;
if(c>=0xE0 && c<0xF0) return 3;
if(c>=0xF0 && c<0xF8) return 4;
if(c>=0xF8 && c<0xFC) return 5;
if(c>=0xFC) return 6;
}
int enc_utf8_to_unicode_one(const unsigned char* pInput unsigned long *Unic)
{
assert(pInput != NULL && Unic != NULL);
char b1 b2 b3 b4 b5 b6;
*Unic = 0x0;
int utfbytes = enc_get_utf8_size(*pInput);
unsigned char *pOutput = (unsigned char *) Unic;
switch ( utfbytes )
{
case 0:
*pOutput = *pInput;
utfbytes += 1;
break;
case 2:
b1 = *pInput;
b2 = *(pInput + 1);
if ( (b2 & 0xE0) != 0x80 )
return 0;
*pOutput = (b1 << 6) + (b2 & 0x3F);
*(pOutput+1) = (b1 >> 2) & 0x07;
break;
case 3:
b1 = *pInput;
b2 = *(pInput + 1);
b3 = *(pInput + 2);
if ( ((b2 & 0xC0) != 0x80) || ((b3 & 0xC0) != 0x80) )
return 0;
*pOutput = (b2 << 6) + (b3 & 0x3F);
*(pOutput+1) = (b1 << 4) + ((b2 >> 2) & 0x0F);
break;
case 4:
b1 = *pInput;
b2 = *(pInput + 1);
b3 = *(pInput + 2);
b4 = *(pInput + 3);
if ( ((b2 & 0xC0) != 0x80) || ((b3 & 0xC0) != 0x80)
|| ((b4 & 0xC0) != 0x80) )
return 0;
*pOutput = (b3 << 6) + (b4 & 0x3F);
*(pOutput+1) = (b2 << 4) + ((b3 >> 2) & 0x0F);
*(pOutput+2) = ((b1 << 2) & 0x1C) + ((b2 >> 4) & 0x03);
break;
case 5:
b1 = *pInput;
b2 = *(pInput + 1);
b3 = *(pInput + 2);
b4 = *(pInput + 3);
b5 = *(pInput + 4);
if ( ((b2 & 0xC0) != 0x80) || ((b3 & 0xC0) != 0x80)
|| ((b4 & 0xC0) != 0x80) || ((b5 & 0xC0) != 0x80) )
return 0;
*pOutput = (b4 << 6) + (b5 & 0x3F);
*(pOutput+1) = (b3 << 4) + ((b4 >> 2) & 0x0F);
*(pOutput+2) = (b2 << 2) + ((b3 >> 4) & 0x03);
*(pOutput+3) = (b1 << 6);
break;
case 6:
b1 = *pInput;
b2 = *(pInput + 1);
b3 = *(pInput + 2);
b4 = *(pInput + 3);
b5 = *(pInput + 4);
b6 = *(pInput + 5);
if ( ((b2 & 0xC0) != 0x80) || ((b3 & 0xC0) != 0x80)
|| ((b4 & 0xC0) != 0x80) || ((b5 & 0xC0) != 0x80)
|| ((b6 & 0xC0) != 0x80) )
return 0;
*pOutput = (b5 << 6) + (b6 & 0x3F);
*(pOutput+1) = (b5 << 4) + ((b6 >> 2) & 0x0F);
*(pOutput+2) = (b3
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-07 14:52 ui_qt\
文件 1333 2018-07-03 14:05 ui_qt\.gitignore
文件 81 2018-07-03 14:05 ui_qt\Apushqt.bat
文件 99 2018-07-03 14:05 ui_qt\Apushqt_run.bat
目录 0 2019-03-07 15:19 ui_qt\build\
文件 27960 2019-03-07 14:41 ui_qt\build\about.o
文件 13976 2019-03-07 14:42 ui_qt\build\adas.o
文件 13080 2019-03-07 14:42 ui_qt\build\cprojectionpicture.o
文件 14484 2019-03-07 14:42 ui_qt\build\dashboard.o
文件 21344 2019-03-07 14:42 ui_qt\build\frmmessagebox.o
文件 20300 2019-03-07 14:41 ui_qt\build\front_adas_setting.o
文件 14508 2019-03-07 14:41 ui_qt\build\front_camera_setting.o
文件 7544 2019-03-07 15:19 ui_qt\build\main.o
文件 5752 2019-03-07 14:42 ui_qt\build\midwindow.o
文件 3735 2019-03-07 14:42 ui_qt\build\moc_about.cpp
文件 7124 2019-03-07 14:42 ui_qt\build\moc_about.o
文件 4644 2019-03-07 14:42 ui_qt\build\moc_adas.cpp
文件 7524 2019-03-07 14:42 ui_qt\build\moc_adas.o
文件 4105 2019-03-07 14:42 ui_qt\build\moc_cprojectionpicture.cpp
文件 9560 2019-03-07 14:42 ui_qt\build\moc_cprojectionpicture.o
文件 3305 2019-03-07 14:42 ui_qt\build\moc_dashboard.cpp
文件 6876 2019-03-07 14:42 ui_qt\build\moc_dashboard.o
文件 3370 2019-03-07 14:42 ui_qt\build\moc_frmmessagebox.cpp
文件 6968 2019-03-07 14:42 ui_qt\build\moc_frmmessagebox.o
文件 4733 2019-03-07 14:42 ui_qt\build\moc_front_adas_setting.cpp
文件 7752 2019-03-07 14:42 ui_qt\build\moc_front_adas_setting.o
文件 4911 2019-03-07 14:42 ui_qt\build\moc_front_camera_setting.cpp
文件 7916 2019-03-07 14:42 ui_qt\build\moc_front_camera_setting.o
文件 5855 2019-03-07 14:52 ui_qt\build\moc_main_desktop.cpp
文件 8520 2019-03-07 14:52 ui_qt\build\moc_main_desktop.o
文件 6372 2019-03-07 14:42 ui_qt\build\moc_midwindow.cpp
............此处省略632个文件信息
- 上一篇:JavaReport-V3 完整版本
- 下一篇:java客房管理系统
相关资源
- Apk icon editor_1.8.0 中文版(APK图标编辑
- 最新Android Studio3.0.1版收发MQTT消息
- mqtt详细
- mqtt + webScoket + apollo 具体
- android MQTT的使用及demo
- MQTT协议在Android的使用demo
- Android集成消息推送之MQTT
- qtjambi-4.5.2开发包+qtjambi-eclipse插件.z
- QT for Android下Service的创建
- Qt Quick核心编程(高清pdf扫描版)
- Qt Quick核心编程.安晓辉(带详细书签
- QtonAndroid核心编程_完整版PDF电子书.
- send_mqtt.zip
- Qt on Android 启动Android服务并通过该服
- Qt 模仿 Android滑动窗口效果
- Qt AES算法ECB模式 PKCS5Padding 128bit
- qt for android 实现悬浮窗
- MQTT jar包 wmqtt.jar
- MQTT消息队列mosquitto的java方式实现客户
- Qt on Android调用Jar包
- org.eclipse.paho.client.mqttv3-1.0.1
- 基于Eclipse paho的MQTT java客户端
- MQTT JAVA jar包 wmqtt.jar
- MQTT相关java代码实现
- Qt on Android可伸缩界面
- Qt(5.9) for Android(6.0) 调用JNI接口
- 基于Qt WebChannel实现QT与HTML页面通信
- 在Qt平台C++和Java代码的交互
- Qt Android 调用JAVA
- 使用pyqtdeploy 发布你的 pyqt5 应用程序
评论
共有 条评论